Sort files before loading
MEMBER
This will be fixed by https://github.com/huggingface/datasets/pull/3221
2021-11-05T14:15:00Z
https://github.com/huggingface/datasets/issues/3212#issuecomment-961930320
https://api.github.com/repos/huggingface/datasets/issues/3212
IC_kwDODunzps45VeRQ
https://api.github.com/repos/huggingface/datasets/issues/comments/961930320/reactions
2021-11-05T14:15:00Z
https://api.github.com/repos/huggingface/datasets/issues/comments/961930320
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
When loading a dataset that consists of several files (e.g. `my_data/data_001.json`, `my_data/data_002.json` etc.) they are not loaded in order when using `load_dataset("my_data")`.

This could lead to counter-intuitive results if, for example, the data files are sorted by date or similar since they would appear in different order in the `Dataset`.

The straightforward solution is to sort the list of files alphabetically before loading them.

cc @lhoestq 
