ultralytics 8.3.133 Search relative YAML dataset paths in training (#20607)
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
This commit is contained in:
parent
689513bc51
commit
cb2574aeb6
@ -424,8 +424,8 @@ def check_det_dataset(dataset, autodownload=True):
|
||||
|
||||
# Resolve paths
|
||||
path = Path(extract_dir or data.get("path") or Path(data.get("yaml_file", "")).parent) # dataset root
|
||||
if not path.is_absolute():
|
||||
path = (DATASETS_DIR / path).resolve()
|
||||
if not path.exists() and not path.is_absolute():
|
||||
path = (DATASETS_DIR / path).resolve() # path relative to DATASETS_DIR
|
||||
|
||||
# Set paths
|
||||
data["path"] = path # download scripts
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user