Skip to content

Commit 12976df

Browse files
committed
Make FT
1 parent 68d3ca0 commit 12976df

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

algorithmic_efficiency/logger_utils.py

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -66,13 +66,15 @@ def get_log_dir(
6666
f'Resuming from experiment directory {experiment_path} because '
6767
'--resume_last_run was set.')
6868
else:
69-
resume = 'y'
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()
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()
7678

7779
if USE_PYTORCH_DDP:
7880
dist.barrier()

0 commit comments

Comments
 (0)