mirror of
https://github.com/wassname/ray.git
synced 2026-07-24 13:20:22 +08:00
[tune] fix log dir race condition (#6420)
This commit is contained in:
@@ -76,8 +76,8 @@ class Trainable(object):
|
||||
self._logdir = self._result_logger.logdir
|
||||
else:
|
||||
logdir_prefix = datetime.today().strftime("%Y-%m-%d_%H-%M-%S")
|
||||
if not os.path.exists(DEFAULT_RESULTS_DIR):
|
||||
os.makedirs(DEFAULT_RESULTS_DIR)
|
||||
ray.utils.try_to_create_directory(
|
||||
DEFAULT_RESULTS_DIR, warn_if_exist=False)
|
||||
self._logdir = tempfile.mkdtemp(
|
||||
prefix=logdir_prefix, dir=DEFAULT_RESULTS_DIR)
|
||||
self._result_logger = UnifiedLogger(
|
||||
|
||||
Reference in New Issue
Block a user