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

Fixing local directory #977

Merged
merged 2 commits into from
Sep 14, 2017
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Fixing local directory
Enables ability to set custom local directory; code may be messy.
  • Loading branch information
richardliaw authored Sep 14, 2017
commit 70237d8994b1f62f0a76ccdfba44331b95a9db66
3 changes: 2 additions & 1 deletion python/ray/rllib/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,8 @@ def __init__(self, env_name, config, upload_dir=None):
self.__class__.__name__,
datetime.today().strftime("%Y-%m-%d_%H-%M-%S"))
if upload_dir.startswith("file"):
self.logdir = tempfile.mkdtemp(prefix=prefix, dir="/tmp/ray")
local_dir = upload_dir[len("file://"):]
self.logdir = tempfile.mkdtemp(prefix=prefix, dir=local_dir)
else:
self.logdir = os.path.join(upload_dir, prefix)

Expand Down