Fix KeyboardInterrupt in map and bad indices in select
MEMBER
Thanks @TevenLeScao for finding this issue
2020-07-31T09:16:12Z
https://github.com/huggingface/datasets/pull/460#issuecomment-667023535
https://api.github.com/repos/huggingface/datasets/issues/460
MDEyOklzc3VlQ29tbWVudDY2NzAyMzUzNQ==
https://api.github.com/repos/huggingface/datasets/issues/comments/667023535/reactions
2020-07-31T09:16:12Z
https://api.github.com/repos/huggingface/datasets/issues/comments/667023535
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
CONTRIBUTOR
Thanks @lhoestq for catching this ❤️
2020-07-31T10:37:27Z
https://github.com/huggingface/datasets/pull/460#issuecomment-667056123
https://api.github.com/repos/huggingface/datasets/issues/460
MDEyOklzc3VlQ29tbWVudDY2NzA1NjEyMw==
https://api.github.com/repos/huggingface/datasets/issues/comments/667056123/reactions
2020-07-31T10:37:27Z
https://api.github.com/repos/huggingface/datasets/issues/comments/667056123
https://avatars.githubusercontent.com/u/26709476?v=4
https://api.github.com/users/TevenLeScao/events{/privacy}
https://api.github.com/users/TevenLeScao/followers
https://api.github.com/users/TevenLeScao/following{/other_user}
https://api.github.com/users/TevenLeScao/gists{/gist_id}
https://github.com/TevenLeScao
TevenLeScao
MDQ6VXNlcjI2NzA5NDc2
https://api.github.com/users/TevenLeScao/orgs
https://api.github.com/users/TevenLeScao/received_events
https://api.github.com/users/TevenLeScao/repos
https://api.github.com/users/TevenLeScao/starred{/owner}{/repo}
https://api.github.com/users/TevenLeScao/subscriptions
User
https://api.github.com/users/TevenLeScao
public
If you interrupted a map function while it was writing, the cached file was not discarded.
Therefore the next time you called map, it was loading an incomplete arrow file.

We had the same issue with select if there was a bad indice at one point.

To fix that I used temporary files that are renamed once everything is finished.