From 95f0a56df721ced26af2d08710b2340b226bbf26 Mon Sep 17 00:00:00 2001 From: Alex Stoken Date: Tue, 7 Jul 2020 11:19:49 -0500 Subject: [PATCH] Bug fix to get_latest_run when recent run is named --- utils/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/utils.py b/utils/utils.py index d9e0b83..35be9ea 100755 --- a/utils/utils.py +++ b/utils/utils.py @@ -39,7 +39,7 @@ def init_seeds(seed=0): def get_latest_run(search_dir = './runs'): # get path to most recent 'last.pt' in run dirs # assumes most recently saved 'last.pt' is the desired weights to --resume from - last_list = glob.glob(f'{search_dir}/**/last.pt', recursive=True) + last_list = glob.glob(f'{search_dir}/**/last*.pt', recursive=True) latest = max(last_list, key = os.path.getctime) return latest