Skip to content

Commit

Permalink
Rename evolve folder if default project name (#11108)
Browse files Browse the repository at this point in the history
Save logs to 'runs/evolve-seg' if default project name, 'runs/train-seg'

Signed-off-by: Iker Lluvia <iker.lluvia@tekniker.es>
  • Loading branch information
iker-lluvia committed Mar 6, 2023
1 parent 5c91dae commit 85f6019
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions segment/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 85f6019

Please sign in to comment.