Fix streaming datasets that are not reset correctly
MEMBER
Works smoothly with the `transformers.Trainer` class now, thank you!
2022-01-27T17:29:17Z
https://github.com/huggingface/datasets/pull/3646#issuecomment-1023470007
https://api.github.com/repos/huggingface/datasets/issues/3646
IC_kwDODunzps49AOm3
https://api.github.com/repos/huggingface/datasets/issues/comments/1023470007/reactions
2022-01-27T17:29:17Z
https://api.github.com/repos/huggingface/datasets/issues/comments/1023470007
https://avatars.githubusercontent.com/u/26864830?v=4
https://api.github.com/users/anton-l/events{/privacy}
https://api.github.com/users/anton-l/followers
https://api.github.com/users/anton-l/following{/other_user}
https://api.github.com/users/anton-l/gists{/gist_id}
https://github.com/anton-l
anton-l
MDQ6VXNlcjI2ODY0ODMw
https://api.github.com/users/anton-l/orgs
https://api.github.com/users/anton-l/received_events
https://api.github.com/users/anton-l/repos
https://api.github.com/users/anton-l/starred{/owner}{/repo}
https://api.github.com/users/anton-l/subscriptions
User
https://api.github.com/users/anton-l
public
Streaming datasets that use `StreamingDownloadManager.iter_archive` and `StreamingDownloadManager.iter_files` had some issues. Indeed if you try to iterate over such dataset twice, then the second time it will be empty.

This is because the two methods above are generator functions. I fixed this by making them return iterables that are reset properly instead.

Close https://github.com/huggingface/datasets/issues/3645
cc @anton-l 