Bug fix to get_latest_run when recent run is named
Browse files- utils/utils.py +1 -1
utils/utils.py
CHANGED
@@ -39,7 +39,7 @@ def init_seeds(seed=0):
|
|
39 |
def get_latest_run(search_dir = './runs'):
|
40 |
# get path to most recent 'last.pt' in run dirs
|
41 |
# assumes most recently saved 'last.pt' is the desired weights to --resume from
|
42 |
-
last_list = glob.glob(f'{search_dir}/**/last
|
43 |
latest = max(last_list, key = os.path.getctime)
|
44 |
return latest
|
45 |
|
|
|
39 |
def get_latest_run(search_dir = './runs'):
|
40 |
# get path to most recent 'last.pt' in run dirs
|
41 |
# assumes most recently saved 'last.pt' is the desired weights to --resume from
|
42 |
+
last_list = glob.glob(f'{search_dir}/**/last*.pt', recursive=True)
|
43 |
latest = max(last_list, key = os.path.getctime)
|
44 |
return latest
|
45 |
|