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

Local dir cli #146

Merged
merged 4 commits into from Aug 2, 2020
Merged

Conversation

brandontrabucco
Copy link
Member

This pull request adds a --local-dir argument to the command line interface and resolves this issue: #128. I also fixed an issue with pip install -e . that re-installs an older incompatible version of ray.

Copy link
Member

@hartikainen hartikainen left a comment

Choose a reason for hiding this comment

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

Hey @brandontrabucco, thanks a lot for opening this! Can you just do a test that the local dir works as expected? E.g. with ~/ray_results, ~/ray_results/some/folder, and some folder that is outside of ~/ray_results.

@@ -80,8 +80,7 @@ def add_command_line_args_to_variant_spec(variant_spec, command_line_args):


def generate_experiment_kwargs(variant_spec, command_line_args):
# TODO(hartikainen): Allow local dir to be modified through cli args
local_dir = '~/ray_results'
local_dir = command_line_args.local_dir
Copy link
Member

Choose a reason for hiding this comment

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

This looks good to me. Just for my own future reference: If I recall correctly, the reason I originally didn't do this was that there's some edge case where not using the default ~/ray_results local directory made the results get synced to weird places. I can't figure out now what the problem was, so maybe it's been fixed e.g. on the Ray side.

setup.py Outdated Show resolved Hide resolved
@brandontrabucco
Copy link
Member Author

brandontrabucco commented Jul 7, 2020

Thanks for the comment @hartikainen I have tested using a local-dir in a './data' folder rather than ~/ray_results and it appears to work correctly when running experiments locally, but I have not tested how this interacts with the upload-dir. I also tested using nested folders like ~/ray_results/some/folder and that works fine locally as well.

In any case, the default value for the '--local-dir' command line argument is '~/ray_results' so users that depend on consistent behavior between the old local_dir and upload_dir variables should not be impacted, by default.

Co-authored-by: Kristian Hartikainen <kristian.hartikainen@gmail.com>
@brandontrabucco
Copy link
Member Author

Let me know if you'd like me to test anything else before we merge this feature in.

@hartikainen
Copy link
Member

hartikainen commented Jul 8, 2020

Hey @brandontrabucco. Yeah, I think it's important to test that this doesn't mess up the cluster paths too badly. If possible, could you try testing at least the following combinations?

  • --upload-dir=[bucket-name, e.g. gs://test-bucket]/ray_results --local-dir=~/ray_results
  • --upload-dir=[bucket-name, e.g. gs://test-bucket] --local-dir=~/ray_results
  • --upload-dir=[bucket-name, e.g. gs://test-bucket]/ray/results --local-dir=~/ray_results
  • --upload-dir=[bucket-name, e.g. gs://test-bucket]/ray_results --local-dir=./data
  • --upload-dir=[bucket-name, e.g. gs://test-bucket]--local-dir=./data

Once those look reasonable, I'm happy to merge this 🙂

@hartikainen
Copy link
Member

@brandontrabucco I just tested the combinations above and they seem to work as expected. Thanks a lot for contributing this!

@hartikainen hartikainen merged commit 2b55f00 into rail-berkeley:master Aug 2, 2020
@brandontrabucco
Copy link
Member Author

Thanks for doing that!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants