Commit
·
2110f5e
1
Parent(s):
603ea0b
update log_dir to runs/exp #107
Browse files- utils/utils.py +1 -1
utils/utils.py
CHANGED
@@ -910,7 +910,7 @@ def increment_dir(dir, comment=''):
|
|
910 |
d = sorted(glob.glob(dir + '*')) # directories
|
911 |
if len(d):
|
912 |
d = d[-1].replace(dir, '')
|
913 |
-
n = int(d[:d.find('_')]) + 1 # increment
|
914 |
return dir + str(n) + ('_' + comment if comment else '')
|
915 |
|
916 |
|
|
|
910 |
d = sorted(glob.glob(dir + '*')) # directories
|
911 |
if len(d):
|
912 |
d = d[-1].replace(dir, '')
|
913 |
+
n = int(d[:d.find('_')] if '_' in d else d) + 1 # increment
|
914 |
return dir + str(n) + ('_' + comment if comment else '')
|
915 |
|
916 |
|