[load_dataset] shard and parallelize the process
{'login': 'stas00', 'id': 10676103, 'node_id': 'MDQ6VXNlcjEwNjc2MTAz', 'avatar_url': 'https://avatars.githubusercontent.com/u/10676103?v=4', 'gravatar_id': '', 'url': 'https://api.github.com/users/stas00', 'html_url': 'https://github.com/stas00', 'followers_url': 'https://api.github.com/users/stas00/followers', 'following_url': 'https://api.github.com/users/stas00/following{/other_user}', 'gists_url': 'https://api.github.com/users/stas00/gists{/gist_id}', 'starred_url': 'https://api.github.com/users/stas00/starred{/owner}{/repo}', 'subscriptions_url': 'https://api.github.com/users/stas00/subscriptions', 'organizations_url': 'https://api.github.com/users/stas00/orgs', 'repos_url': 'https://api.github.com/users/stas00/repos', 'events_url': 'https://api.github.com/users/stas00/events{/privacy}', 'received_events_url': 'https://api.github.com/users/stas00/received_events', 'type': 'User', 'site_admin': False}
[{'id': 1935892871, 'node_id': 'MDU6TGFiZWwxOTM1ODkyODcx', 'url': 'https://api.github.com/repos/huggingface/datasets/labels/enhancement', 'name': 'enhancement', 'color': 'a2eeef', 'default': True, 'description': 'New feature or request'}]
{'login': 'TevenLeScao', 'id': 26709476, 'node_id': 'MDQ6VXNlcjI2NzA5NDc2', 'avatar_url': 'https://avatars.githubusercontent.com/u/26709476?v=4', 'gravatar_id': '', 'url': 'https://api.github.com/users/TevenLeScao', 'html_url': 'https://github.com/TevenLeScao', 'followers_url': 'https://api.github.com/users/TevenLeScao/followers', 'following_url': 'https://api.github.com/users/TevenLeScao/following{/other_user}', 'gists_url': 'https://api.github.com/users/TevenLeScao/gists{/gist_id}', 'starred_url': 'https://api.github.com/users/TevenLeScao/starred{/owner}{/repo}', 'subscriptions_url': 'https://api.github.com/users/TevenLeScao/subscriptions', 'organizations_url': 'https://api.github.com/users/TevenLeScao/orgs', 'repos_url': 'https://api.github.com/users/TevenLeScao/repos', 'events_url': 'https://api.github.com/users/TevenLeScao/events{/privacy}', 'received_events_url': 'https://api.github.com/users/TevenLeScao/received_events', 'type': 'User', 'site_admin': False}
[{'login': 'TevenLeScao', 'id': 26709476, 'node_id': 'MDQ6VXNlcjI2NzA5NDc2', 'avatar_url': 'https://avatars.githubusercontent.com/u/26709476?v=4', 'gravatar_id': '', 'url': 'https://api.github.com/users/TevenLeScao', 'html_url': 'https://github.com/TevenLeScao', 'followers_url': 'https://api.github.com/users/TevenLeScao/followers', 'following_url': 'https://api.github.com/users/TevenLeScao/following{/other_user}', 'gists_url': 'https://api.github.com/users/TevenLeScao/gists{/gist_id}', 'starred_url': 'https://api.github.com/users/TevenLeScao/starred{/owner}{/repo}', 'subscriptions_url': 'https://api.github.com/users/TevenLeScao/subscriptions', 'organizations_url': 'https://api.github.com/users/TevenLeScao/orgs', 'repos_url': 'https://api.github.com/users/TevenLeScao/repos', 'events_url': 'https://api.github.com/users/TevenLeScao/events{/privacy}', 'received_events_url': 'https://api.github.com/users/TevenLeScao/received_events', 'type': 'User', 'site_admin': False}]
I need the same feature for distributed training I think @TevenLeScao is exploring adding multiprocessing in `GeneratorBasedBuilder._prepare_split` - feel free to post updates here :) Posted a PR to address the building side, still needs something to load sharded arrow files + tests
- Some huge datasets take forever to build the first time. (e.g. oscar/en) as it's done in a single cpu core.
- If the build crashes, everything done up to that point gets lost

Request: Shard the build over multiple arrow files, which would enable:
- much faster build by parallelizing the build process
- if the process crashed, the completed arrow files don't need to be re-built again

Thank you!

@lhoestq 
{'url': 'https://api.github.com/repos/huggingface/datasets/issues/2650/reactions', 'total_count': 10, '+1': 5, '-1': 0, 'laugh': 0, 'hooray': 0, 'confused': 0, 'heart': 0, 'rocket': 2, 'eyes': 3}