Skip to content

Commit

Permalink
Update extension file not found error to be less confusing (#579)
Browse files Browse the repository at this point in the history
  • Loading branch information
irenedea committed Sep 6, 2023
1 parent 8687a16 commit e891c30
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions llmfoundry/data/finetuning/dataloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -307,10 +307,14 @@ def _build_hf_dataset_from_remote(
get_file(name, destination, overwrite=True)
except FileNotFoundError as e:
if extension == supported_extensions[-1]:
files_searched = [
f'{cfg.dataset.hf_name}/{cfg.dataset.split}.{ext}'
for ext in supported_extensions
]
raise FileNotFoundError(
f'Could not find a {cfg.dataset.split} file with any of ' + \
f'Could not find a file with any of ' + \
f'the supported extensions: {supported_extensions}\n' + \
f'at {cfg.dataset.hf_name}/{cfg.dataset.split}'
f'at {files_searched}'
) from e
else:
print(
Expand Down

0 comments on commit e891c30

Please sign in to comment.