Guard against duplicate builder_kwargs/config_kwargs in load_dataset_…
NONE
Hi folks, this PR fixes the duplicate-kwargs edge case and includes a unit test. Would love a review when you have a moment!

@zach-huggingface
@SunMarc 
2025-07-02T12:39:09Z
https://github.com/huggingface/datasets/pull/7622#issuecomment-3027722724
https://api.github.com/repos/huggingface/datasets/issues/7622
IC_kwDODunzps60d2Hk
https://api.github.com/repos/huggingface/datasets/issues/comments/3027722724/reactions
2025-07-02T12:39:20Z
https://api.github.com/repos/huggingface/datasets/issues/comments/3027722724
https://avatars.githubusercontent.com/u/149825575?v=4
https://api.github.com/users/Shohail-Ismail/events{/privacy}
https://api.github.com/users/Shohail-Ismail/followers
https://api.github.com/users/Shohail-Ismail/following{/other_user}
https://api.github.com/users/Shohail-Ismail/gists{/gist_id}
https://github.com/Shohail-Ismail
Shohail-Ismail
U_kgDOCO4oJw
https://api.github.com/users/Shohail-Ismail/orgs
https://api.github.com/users/Shohail-Ismail/received_events
https://api.github.com/users/Shohail-Ismail/repos
https://api.github.com/users/Shohail-Ismail/starred{/owner}{/repo}
https://api.github.com/users/Shohail-Ismail/subscriptions
User
https://api.github.com/users/Shohail-Ismail
public
…builder (#4910 )

### What does this PR do?

Fixes edge case in `load_dataset_builder` by raising a `TypeError` if the same key exists in both `builder_kwargs` and `config_kwargs`.

### Implementation details

- Added a guard clause in `load_dataset_builder` to detect duplicate keys between `builder_kwargs` and `config_kwargs`
 
- Wrote a unit test in `tests/test_load_duplicate_keys.py` to verify the exception is raised correctly 

### Fixes

Closes #4910 

### Reviewers

@zach-huggingface
@SunMarc 

Would appreciate your review if you have time - thanks!