Skip to content

Commit

Permalink
Update warning emojis (#8678)
Browse files Browse the repository at this point in the history
  • Loading branch information
glenn-jocher committed Jul 22, 2022
1 parent 38721de commit b17629e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions utils/general.py
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,7 @@ def check_dataset(data, autodownload=True):
for k in 'train', 'val', 'nc':
assert k in data, emojis(f"data.yaml '{k}:' field missing ❌")
if 'names' not in data:
LOGGER.warning(emojis("data.yaml 'names:' field missing ⚠, assigning default names 'class0', 'class1', etc."))
LOGGER.warning(emojis("data.yaml 'names:' field missing ⚠, assigning default names 'class0', 'class1', etc."))
data['names'] = [f'class{i}' for i in range(data['nc'])] # default names

# Resolve paths
Expand All @@ -490,7 +490,7 @@ def check_dataset(data, autodownload=True):
if val:
val = [Path(x).resolve() for x in (val if isinstance(val, list) else [val])] # val path
if not all(x.exists() for x in val):
LOGGER.info(emojis('\nDataset not found ⚠, missing paths %s' % [str(x) for x in val if not x.exists()]))
LOGGER.info(emojis('\nDataset not found ⚠, missing paths %s' % [str(x) for x in val if not x.exists()]))
if not s or not autodownload:
raise Exception(emojis('Dataset not found ❌'))
t = time.time()
Expand Down

0 comments on commit b17629e

Please sign in to comment.