Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions autoPyTorch/utils/backend.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import glob
import os
import pickle
import re
import shutil
import tempfile
import time
Expand Down Expand Up @@ -359,9 +360,8 @@ def get_next_num_run(self, peek: bool = False) -> int:

# If there are other num_runs, their name would be runs/<seed>_<num_run>_<budget>
other_num_runs = [int(os.path.basename(run_dir).split('_')[1])
for run_dir in glob.glob(os.path.join(self.internals_directory,
'runs',
'*')) if '_' in os.path.basename(run_dir)]
for run_dir in glob.glob(os.path.join(self.internals_directory, 'runs', '*'))
if re.match(r"\d+_\d+_\d+", os.path.basename(run_dir))]
if len(other_num_runs) > 0:
# We track the number of runs from two forefronts:
# The physically available num_runs (which might be deleted or a crash could happen)
Expand Down