[tune] Later expansion of local_dir (#4806)

This commit is contained in:
Richard Liaw
2019-05-25 02:19:28 -07:00
committed by GitHub
parent a7d01aba9b
commit 0ce0ecbe9c
+2 -1
View File
@@ -273,7 +273,7 @@ class Trial(object):
# 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
@@ -346,6 +346,7 @@ class Trial(object):
@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(