Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add capability to exclude directories/file types from file_mounts within cluster YAML #10110

Closed
wants to merge 2 commits into from

Conversation

richardrl
Copy link

@richardrl richardrl commented Aug 14, 2020

Why are these changes needed?

Small syntax error fixes that prevent running various functions like "ray submit" successfully and add functionality for excluding files when syncing directories to clusters.

Checks

  • I've run scripts/format.sh to lint the changes in this PR. -> No, I get this error and I don't know what it means:
    flake8: error: unrecognized arguments: --inline-quotes --no-avoid-escape python/ray/autoscaler/autoscaler.py python/ray/autoscaler/command_runner.py python/ray/autoscaler/commands.py python/ray/autoscaler/node_provider.py python/ray/autoscaler/updater.py python/ray/scripts/scripts.py python/ray/tune/suggest/suggestion.py python/ray/tune/syncer.py
  • I've included any doc changes needed for https://docs.ray.io/en/latest/.
  • I've made sure the tests are passing. Note that there might be a few flaky tests, see the recent failure rates at https://ray-travis-tracker.herokuapp.com/.
  • Testing Strategy
    • Unit tests
    • Release tests
    • This PR is not tested (please justify below)
      Not sure what to run. Are there explicit instructions anywhere?

…cker is in the cmd, we should actually run the cmd in the host system
with yamls etc

Changes to support exclude list

More changes to get exclude list working

Modify scripts to py to support new create_or_update_cluster

Enable rsync down for all nodes

Clean yamls
@richardrl
Copy link
Author

To use, add like this to YAML (rsync exclude syntax):

exclude_list:
 - "out/"
 - ".git/"
 - "histograms/"

@richardrl richardrl changed the title Add exclude to yaml Add capability to exclude directories/file types from file_mounts within cluster YAML Aug 14, 2020
@ijrsvt
Copy link
Contributor

ijrsvt commented Aug 17, 2020

@richardrl To run ./scripts/format.sh first install the following packages

flake8==3.7.7 
flake8-comprehensions
flake8-quotes==2.0.0
yapf==0.23.0

Comment on lines +927 to +930
try:
rsync(source, target)
except:
print(f"Rsync failed for node {node_id} \n")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this just for debugging?

Copy link
Contributor

@ijrsvt ijrsvt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great idea for a PR--this will be super useful to reduce the number of extraneous files being copied (especially caches and .git files). The only thing is it would be great to try to keep this option just for the relevant commands (rsync). If you have any questions--please let me know in follow-ups :)

Comment on lines 486 to 487
def run_rsync_up(self, source, target):
self._set_ssh_ip_if_required()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you possibly include this as an argument to run_rsync_up and run_rsync_down instead of the constructors?

Comment on lines +928 to 932
rsync(source, target)
except:
print(f"Rsync failed for node {node_id} \n")
else:
updater.sync_file_mounts(rsync)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Specifically, can you pas in the exclude_list into to the rsync function and the updater.sync_file_mounts function.

Since rsync is just updater.rsync_down or updater.rsync_up, those two functions need to be modified.

@ijrsvt
Copy link
Contributor

ijrsvt commented Aug 19, 2020

Oh, can you also pull the latest master locally and then merge master to hide all the changes already committed?

@ijrsvt ijrsvt added the @author-action-required The PR author is responsible for the next step. Remove tag to send back to the reviewer. label Aug 19, 2020
@bveeramani
Copy link
Member

‼️ ACTION REQUIRED ‼️

We've switched our code formatter from YAPF to Black (see #21311).

To prevent issues with merging your code, here's what you'll need to do:

  1. Install Black
pip install -I black==21.12b0
  1. Format changed files with Black
curl -o format-changed.sh https://gist.githubusercontent.com/bveeramani/42ef0e9e387b755a8a735b084af976f2/raw/7631276790765d555c423b8db2b679fd957b984a/format-changed.sh
chmod +x ./format-changed.sh
./format-changed.sh
rm format-changed.sh
  1. Commit your changes.
git add --all
git commit -m "Format Python code with Black"
  1. Merge master into your branch.
git pull upstream master
  1. Resolve merge conflicts (if necessary).

After running these steps, you'll have the updated format.sh.

@stale
Copy link

stale bot commented Mar 6, 2022

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. Thank you for your contributions.

  • If you'd like to keep this open, just leave any comment, and the stale label will be removed.

@stale stale bot added the stale The issue is stale. It will be closed within 7 days unless there are further conversation label Mar 6, 2022
@stale
Copy link

stale bot commented Apr 18, 2022

Hi again! The issue will be closed because there has been no more activity in the 14 days since the last message.

Please feel free to reopen or open a new issue if you'd still like it to be addressed.

Again, you can always ask for help on our discussion forum or Ray's public slack channel.

Thanks again for opening the issue!

@stale stale bot closed this Apr 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@author-action-required The PR author is responsible for the next step. Remove tag to send back to the reviewer. stale The issue is stale. It will be closed within 7 days unless there are further conversation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants