Skip to content

Conversation

albertvillanova
Copy link
Member

Fix duplicating default config names.

Currently, when calling push_to_hub(set_default=True with 2 different config names, both are set as default.

Moreover, this will generate an error next time we try to push another default config name, raised by MetadataConfigs.get_default_config_name:

default_config_name = metadata_configs.get_default_config_name()

raise ValueError(
f"Dataset has several default configs: '{default_config_name}' and '{config_name}'."
)

@HuggingFaceDocBuilderDev

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.

This reverts commit d19a5bc.
@albertvillanova albertvillanova changed the title Fix duplicating default config names Avoid duplicating default config names May 26, 2025
@albertvillanova albertvillanova changed the title Avoid duplicating default config names Avoid multiple default config names May 26, 2025
Copy link
Member

@lhoestq lhoestq left a comment

Choose a reason for hiding this comment

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

lgtm !

@albertvillanova albertvillanova merged commit 50fcf69 into huggingface:main Jun 5, 2025
6 of 14 checks passed
@albertvillanova albertvillanova deleted the fix-duplicating-default-config branch June 5, 2025 12:41
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