feat: Return the name of the currently loaded file
MEMBER
Your change adds a new element in the key used to avoid duplicates when generating the examples of a dataset. I don't think it fixes the issue you're trying to solve.
2023-08-29T12:41:05Z
https://github.com/huggingface/datasets/pull/6170#issuecomment-1697368432
https://api.github.com/repos/huggingface/datasets/issues/6170
IC_kwDODunzps5lK8lw
https://api.github.com/repos/huggingface/datasets/issues/comments/1697368432/reactions
2023-08-29T12:41:05Z
https://api.github.com/repos/huggingface/datasets/issues/comments/1697368432
https://avatars.githubusercontent.com/u/42851186?v=4
https://api.github.com/users/lhoestq/events{/privacy}
https://api.github.com/users/lhoestq/followers
https://api.github.com/users/lhoestq/following{/other_user}
https://api.github.com/users/lhoestq/gists{/gist_id}
https://github.com/lhoestq
lhoestq
MDQ6VXNlcjQyODUxMTg2
https://api.github.com/users/lhoestq/orgs
https://api.github.com/users/lhoestq/received_events
https://api.github.com/users/lhoestq/repos
https://api.github.com/users/lhoestq/starred{/owner}{/repo}
https://api.github.com/users/lhoestq/subscriptions
User
https://api.github.com/users/lhoestq
public
Added an optional parameter return_file_name in the load_dataset function. When it is set to True, the function will include the name of the file corresponding to the current line as a feature in the returned output.

I added this here https://github.com/huggingface/datasets/blob/main/src/datasets/packaged_modules/json/json.py#L92.

fixes #5806