8.0.15 CLI float bug fix (#567)

single_channel
Glenn Jocher 2 years ago committed by GitHub
parent 21b701c4ea
commit 3c4de102f6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -48,7 +48,7 @@ def test_val_classify():
# Predict checks ------------------------------------------------------------------------------------------------------- # Predict checks -------------------------------------------------------------------------------------------------------
def test_predict_detect(): def test_predict_detect():
run(f"yolo predict detect model={MODEL}.pt source={ROOT / 'assets'}") run(f"yolo predict detect model={MODEL}.pt source={ROOT / 'assets'} imgsz=320 conf=0.25")
def test_predict_segment(): def test_predict_segment():

@ -1,6 +1,6 @@
# Ultralytics YOLO 🚀, GPL-3.0 license # Ultralytics YOLO 🚀, GPL-3.0 license
__version__ = "8.0.14" __version__ = "8.0.15"
from ultralytics.yolo.engine.model import YOLO from ultralytics.yolo.engine.model import YOLO
from ultralytics.yolo.utils import ops from ultralytics.yolo.utils import ops

@ -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:

@ -172,7 +172,6 @@ class YOLO:
args = get_cfg(cfg=DEFAULT_CFG, overrides=overrides) args = get_cfg(cfg=DEFAULT_CFG, overrides=overrides)
args.task = self.task args.task = self.task
print(args)
exporter = Exporter(overrides=args) exporter = Exporter(overrides=args)
exporter(model=self.model) exporter(model=self.model)

Loading…
Cancel
Save