From 2110f5ee89c6a9475f3fe760a6abd36ff041deab Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Thu, 9 Jul 2020 16:03:10 -0700 Subject: [PATCH] update log_dir to runs/exp #107 --- utils/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/utils.py b/utils/utils.py index 486dca6..439a4e0 100755 --- a/utils/utils.py +++ b/utils/utils.py @@ -910,7 +910,7 @@ def increment_dir(dir, comment=''): d = sorted(glob.glob(dir + '*')) # directories if len(d): d = d[-1].replace(dir, '') - n = int(d[:d.find('_')]) + 1 # increment + n = int(d[:d.find('_')] if '_' in d else d) + 1 # increment return dir + str(n) + ('_' + comment if comment else '')