single command --resume (#756)

* single command --resume

* else check files, remove TODO

* argparse.Namespace()

* tensorboard lr

* bug fix in get_latest_run()
This commit is contained in:
Glenn Jocher authored and GitHub committed 2020-08-17 16:28:43 -07:00
1 parent 26c3b11fdc
commit ebafd1ead5
2 files changed
+31 -26

No files matched your search

+1 -1
View File
@@ -61,7 +61,7 @@ def init_seeds(seed=0):
def get_latest_run(search_dir='./runs'):
# Return path to most recent 'last.pt' in /runs (i.e. to --resume from)
last_list = glob.glob(f'{search_dir}/**/last*.pt', recursive=True)
return max(last_list, key=os.path.getctime)
return max(last_list, key=os.path.getctime) if last_list else ''
def check_git_status():