Skip to content

Commit

Permalink
[tune] Later expansion of local_dir (#4806)
Browse files Browse the repository at this point in the history
  • Loading branch information
richardliaw authored May 25, 2019
1 parent a7d01ab commit 0ce0ecb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion python/ray/tune/trial.py
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ def __init__(self,
# Trial config
self.trainable_name = trainable_name
self.config = config or {}
self.local_dir = os.path.expanduser(local_dir)
self.local_dir = local_dir # This remains unexpanded for syncing.
self.experiment_tag = experiment_tag
self.resources = (
resources
Expand Down Expand Up @@ -346,6 +346,7 @@ def generate_id(cls):

@classmethod
def create_logdir(cls, identifier, local_dir):
local_dir = os.path.expanduser(local_dir)
if not os.path.exists(local_dir):
os.makedirs(local_dir)
return tempfile.mkdtemp(
Expand Down

0 comments on commit 0ce0ecb

Please sign in to comment.