Fix Path objects lacking split method (#18427)
Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com> Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com> Co-authored-by: UltralyticsAssistant <web@ultralytics.com>
This commit is contained in:
parent
1051255c1e
commit
93dc01619b
1 changed files with 1 additions and 1 deletions
|
|
@ -303,7 +303,7 @@ def get_cfg(cfg: Union[str, Path, Dict, SimpleNamespace] = DEFAULT_CFG_DICT, ove
|
|||
if k in cfg and isinstance(cfg[k], (int, float)):
|
||||
cfg[k] = str(cfg[k])
|
||||
if cfg.get("name") == "model": # assign model to 'name' arg
|
||||
cfg["name"] = cfg.get("model", "").split(".")[0]
|
||||
cfg["name"] = str(cfg.get("model", "")).split(".")[0]
|
||||
LOGGER.warning(f"WARNING ⚠️ 'name=model' automatically updated to 'name={cfg['name']}'.")
|
||||
|
||||
# Type and Value checks
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue