|
|
@ -1,4 +1,5 @@
|
|
|
|
# Ultralytics YOLO 🚀, GPL-3.0 license
|
|
|
|
# Ultralytics YOLO 🚀, GPL-3.0 license
|
|
|
|
|
|
|
|
import contextlib
|
|
|
|
import re
|
|
|
|
import re
|
|
|
|
import shutil
|
|
|
|
import shutil
|
|
|
|
import sys
|
|
|
|
import sys
|
|
|
@ -154,15 +155,14 @@ def entrypoint(debug=False):
|
|
|
|
LOGGER.info(f"{PREFIX}Overriding {DEFAULT_CFG_PATH} with {v}")
|
|
|
|
LOGGER.info(f"{PREFIX}Overriding {DEFAULT_CFG_PATH} with {v}")
|
|
|
|
overrides = {k: val for k, val in yaml_load(v).items() if k != 'cfg'}
|
|
|
|
overrides = {k: val for k, val in yaml_load(v).items() if k != 'cfg'}
|
|
|
|
else:
|
|
|
|
else:
|
|
|
|
if v.isnumeric():
|
|
|
|
if v.lower() == 'none':
|
|
|
|
v = eval(v)
|
|
|
|
|
|
|
|
elif v.lower() == 'none':
|
|
|
|
|
|
|
|
v = None
|
|
|
|
v = None
|
|
|
|
elif v.lower() == 'true':
|
|
|
|
elif v.lower() == 'true':
|
|
|
|
v = True
|
|
|
|
v = True
|
|
|
|
elif v.lower() == 'false':
|
|
|
|
elif v.lower() == 'false':
|
|
|
|
v = False
|
|
|
|
v = False
|
|
|
|
elif ',' in v:
|
|
|
|
else:
|
|
|
|
|
|
|
|
with contextlib.suppress(Exception):
|
|
|
|
v = eval(v)
|
|
|
|
v = eval(v)
|
|
|
|
overrides[k] = v
|
|
|
|
overrides[k] = v
|
|
|
|
except (NameError, SyntaxError, ValueError) as e:
|
|
|
|
except (NameError, SyntaxError, ValueError) as e:
|
|
|
|