You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[tune] tune.run_experiments local_dir starting with tilde (~) is interpreted as relative path on macOS #2008
OS Platform and Distribution (e.g., Linux Ubuntu 16.04): macOS High Sierra 10.13.1
Ray installed from (source or binary): pip binary
Ray version: 0.4.0
Python version: Python 3.6.5 :: Anaconda, Inc.
Describe the problem
The following example considers local_dir to be relative to the directory where I run the script, whereas I believe it should consider it to be in the home directory. As an example, if I run the script in /Users/username/ray_local_dir_test, my results get written into /Users/username/ray_local_dir_test/~/ray_results/my_experiment instead of /Users/username/ray_results as I would expect.
This also confuses the ray.tune.log_sync.get_syncer to not correctly modify the remote_dir and thus all the files are written directly to the upload_dir instead of e.g. upload_dir/upload_dir_test/my_experiment/my_func_0_alpha=0.2,beta=2_2018-05-06_15-13-31lkpz7e9q.
Happy to submit a PR to fix this. I guess the upload_dir should be run through os.path.expanduser at some point, maybe in Trial.__init__. Does that sound correct?
changed the title [-]tune.run_experiments local_dir with tilde (~) is interpreted as relative path[/-][+]tune.run_experiments local_dir with tilde (~) is interpreted as relative path on macOS[/+]on May 6, 2018
changed the title [-]tune.run_experiments local_dir with tilde (~) is interpreted as relative path on macOS[/-][+]tune.run_experiments local_dir starting with tilde (~) is interpreted as relative path on macOS[/+]on May 6, 2018
changed the title [-]tune.run_experiments local_dir starting with tilde (~) is interpreted as relative path on macOS[/-][+][tune] tune.run_experiments local_dir starting with tilde (~) is interpreted as relative path on macOS[/+]on May 7, 2018
Activity
[-]tune.run_experiments local_dir with tilde (~) is interpreted as relative path[/-][+]tune.run_experiments local_dir with tilde (~) is interpreted as relative path on macOS[/+][-]tune.run_experiments local_dir with tilde (~) is interpreted as relative path on macOS[/-][+]tune.run_experiments local_dir starting with tilde (~) is interpreted as relative path on macOS[/+][-]tune.run_experiments local_dir starting with tilde (~) is interpreted as relative path on macOS[/-][+][tune] tune.run_experiments local_dir starting with tilde (~) is interpreted as relative path on macOS[/+]richardliaw commentedon May 7, 2018
@hartikainen
expanduserin Trial.init` in line 113 seems to be a right fix for this - would you be willing to submit a PR?hartikainen commentedon May 7, 2018
Thanks @richardliaw. Will do once I get my dev environment running.
richardliaw commentedon May 8, 2018
Merged via #2013 - thanks!