Rename evolve folder if default project name (#11108)
Save logs to 'runs/evolve-seg' if default project name, 'runs/train-seg' Signed-off-by: Iker Lluvia <iker.lluvia@tekniker.es>pull/11109/head
parent
5c91daeaec
commit
85f6019e5a
|
@ -530,8 +530,8 @@ def main(opt, callbacks=Callbacks()):
|
|||
check_file(opt.data), check_yaml(opt.cfg), check_yaml(opt.hyp), str(opt.weights), str(opt.project) # checks
|
||||
assert len(opt.cfg) or len(opt.weights), 'either --cfg or --weights must be specified'
|
||||
if opt.evolve:
|
||||
if opt.project == str(ROOT / 'runs/train'): # if default project name, rename to runs/evolve
|
||||
opt.project = str(ROOT / 'runs/evolve')
|
||||
if opt.project == str(ROOT / 'runs/train-seg'): # if default project name, rename to runs/evolve-seg
|
||||
opt.project = str(ROOT / 'runs/evolve-seg')
|
||||
opt.exist_ok, opt.resume = opt.resume, False # pass resume to exist_ok and disable resume
|
||||
if opt.name == 'cfg':
|
||||
opt.name = Path(opt.cfg).stem # use model.yaml as name
|
||||
|
|
Loading…
Reference in New Issue