Skip to content

Commit 80a93bf

Browse files
committed
minor
1 parent 12976df commit 80a93bf

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

algorithmic_efficiency/logger_utils.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -66,18 +66,18 @@ def get_log_dir(
6666
f'Resuming from experiment directory {experiment_path} because '
6767
'--resume_last_run was set.')
6868
else:
69-
try:
70-
if RANK == 0:
71-
resume = input(
72-
'Found existing experiment dir with the same name: {}. Do you wish '
73-
'to resume training from this dir? [y/N]:'.format(experiment_path))
74-
if resume.lower() != 'y':
75-
sys.exit()
76-
except RuntimeError:
77-
sys.exit()
69+
if RANK == 0:
70+
resume = input(
71+
'Found existing experiment dir with the same name: {}. Do you wish '
72+
'to resume training from this dir? [y/N]:'.format(experiment_path))
73+
if resume.lower() != 'y':
74+
sys.exit()
7875

7976
if USE_PYTORCH_DDP:
80-
dist.barrier()
77+
try:
78+
dist.barrier()
79+
except RuntimeError:
80+
sys.exit()
8181
logging.info(f'Creating experiment directory at {experiment_path}.')
8282
makedir(experiment_path)
8383
return experiment_path

0 commit comments

Comments
 (0)