[tune] Remove py2.7-specific code (#6665)

* Remove backwards compatability py2.7 code.

* Use exists_ok=True in ray

* nit

* nit

Co-authored-by: Richard Liaw <rliaw@berkeley.edu>
This commit is contained in:
Ujval Misra
2020-01-03 01:03:13 -08:00
committed by Richard Liaw
co-authored by Richard Liaw
parent 970cd78701
commit 5b40408678
9 changed files with 18 additions and 52 deletions
+1 -2
View File
@@ -111,8 +111,7 @@ class RayTrialExecutor(TrialExecutor):
def logger_creator(config):
# Set the working dir in the remote process, for user file writes
if not os.path.exists(remote_logdir):
os.makedirs(remote_logdir)
os.makedirs(remote_logdir, exist_ok=True)
if not ray.worker._mode() == ray.worker.LOCAL_MODE:
os.chdir(remote_logdir)
return NoopLogger(config, remote_logdir)