Skip to content

Improve error message for invalid data_files pattern format - #8060

Merged
lhoestq merged 2 commits into
huggingface:mainfrom
kushalkkb:improve-datafiles-error-message
Mar 11, 2026
Merged

Improve error message for invalid data_files pattern format#8060
lhoestq merged 2 commits into
huggingface:mainfrom
kushalkkb:improve-datafiles-error-message

Conversation

@kushalkkb

Copy link
Copy Markdown
Contributor

This PR improves the error message raised in sanitize_patterns()
when an invalid data_files entry is provided.

The new message clearly explains the expected dictionary format:
{'split': <split_name>, 'path': <path_or_list_of_paths>}

This helps users debug incorrect dataset configurations more easily.

@lhoestq lhoestq left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for the improvement !

@lhoestq
lhoestq merged commit 36b79a6 into huggingface:main Mar 11, 2026
@HuggingFaceDocBuilderDev

Copy link
Copy Markdown

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants