From 85f6019e5af2641e33139e97415b7bd1dc72d779 Mon Sep 17 00:00:00 2001 From: Iker Lluvia Date: Mon, 6 Mar 2023 22:54:34 +0100 Subject: [PATCH] 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 --- segment/train.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/segment/train.py b/segment/train.py index 2e71de131a8d..c6ac2d5e23d2 100644 --- a/segment/train.py +++ b/segment/train.py @@ -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