Skip to content

Fix duplicate kwargs in load_dataset_builder#7974

Open
KOKOSde wants to merge 1 commit intohuggingface:mainfrom
KOKOSde:fix/duplicate-builder-kwargs
Open

Fix duplicate kwargs in load_dataset_builder#7974
KOKOSde wants to merge 1 commit intohuggingface:mainfrom
KOKOSde:fix/duplicate-builder-kwargs

Conversation

@KOKOSde
Copy link
Contributor

@KOKOSde KOKOSde commented Jan 31, 2026

Avoid passing duplicate keyword arguments to load_dataset_builder.

Some module factories provide values in builder_kwargs (e.g. base_path), and users can also pass the same keys via config_kwargs, which raises:
TypeError: ... got multiple values for keyword argument ....

Fix: if config_kwargs is provided, drop overlapping keys from builder_kwargs (keep the user-provided values).

Includes a regression test.

@KOKOSde KOKOSde force-pushed the fix/duplicate-builder-kwargs branch from c5675df to a07da30 Compare February 4, 2026 00:08
Avoid TypeError when builder_kwargs and config_kwargs share keys like base_path.

Fixes huggingface#4910
@KOKOSde KOKOSde force-pushed the fix/duplicate-builder-kwargs branch from a07da30 to e6fc266 Compare February 5, 2026 05:49
@KOKOSde
Copy link
Contributor Author

KOKOSde commented Mar 3, 2026

Quick ping on this one. Happy to update anything if you want changes.

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.

1 participant