glenn-jocher
commited on
Update warning emojis (#8678)
Browse files- utils/general.py +2 -2
utils/general.py
CHANGED
@@ -474,7 +474,7 @@ def check_dataset(data, autodownload=True):
|
|
474 |
for k in 'train', 'val', 'nc':
|
475 |
assert k in data, emojis(f"data.yaml '{k}:' field missing ❌")
|
476 |
if 'names' not in data:
|
477 |
-
LOGGER.warning(emojis("data.yaml 'names:' field missing
|
478 |
data['names'] = [f'class{i}' for i in range(data['nc'])] # default names
|
479 |
|
480 |
# Resolve paths
|
@@ -490,7 +490,7 @@ def check_dataset(data, autodownload=True):
|
|
490 |
if val:
|
491 |
val = [Path(x).resolve() for x in (val if isinstance(val, list) else [val])] # val path
|
492 |
if not all(x.exists() for x in val):
|
493 |
-
LOGGER.info(emojis('\nDataset not found
|
494 |
if not s or not autodownload:
|
495 |
raise Exception(emojis('Dataset not found ❌'))
|
496 |
t = time.time()
|
|
|
474 |
for k in 'train', 'val', 'nc':
|
475 |
assert k in data, emojis(f"data.yaml '{k}:' field missing ❌")
|
476 |
if 'names' not in data:
|
477 |
+
LOGGER.warning(emojis("data.yaml 'names:' field missing ⚠️, assigning default names 'class0', 'class1', etc."))
|
478 |
data['names'] = [f'class{i}' for i in range(data['nc'])] # default names
|
479 |
|
480 |
# Resolve paths
|
|
|
490 |
if val:
|
491 |
val = [Path(x).resolve() for x in (val if isinstance(val, list) else [val])] # val path
|
492 |
if not all(x.exists() for x in val):
|
493 |
+
LOGGER.info(emojis('\nDataset not found ⚠️, missing paths %s' % [str(x) for x in val if not x.exists()]))
|
494 |
if not s or not autodownload:
|
495 |
raise Exception(emojis('Dataset not found ❌'))
|
496 |
t = time.time()
|