Add a `lazy_map` method to `Dataset` and `DatasetDict`
MEMBER
This is cool! I think some aspects to think about and decide in terms of API are:
- do we allow several methods (chained i guess)
- how do we inspect the currently set method(s)
- how do we control/reset them
2020-10-27T22:47:08Z
https://github.com/huggingface/datasets/issues/768#issuecomment-717585098
https://api.github.com/repos/huggingface/datasets/issues/768
MDEyOklzc3VlQ29tbWVudDcxNzU4NTA5OA==
https://api.github.com/repos/huggingface/datasets/issues/comments/717585098/reactions
2020-10-27T22:47:08Z
https://api.github.com/repos/huggingface/datasets/issues/comments/717585098
https://avatars.githubusercontent.com/u/7353373?v=4
https://api.github.com/users/thomwolf/events{/privacy}
https://api.github.com/users/thomwolf/followers
https://api.github.com/users/thomwolf/following{/other_user}
https://api.github.com/users/thomwolf/gists{/gist_id}
https://github.com/thomwolf
thomwolf
MDQ6VXNlcjczNTMzNzM=
https://api.github.com/users/thomwolf/orgs
https://api.github.com/users/thomwolf/received_events
https://api.github.com/users/thomwolf/repos
https://api.github.com/users/thomwolf/starred{/owner}{/repo}
https://api.github.com/users/thomwolf/subscriptions
User
https://api.github.com/users/thomwolf
public
The library is great, but it would be even more awesome with a `lazy_map` method implemented on `Dataset` and `DatasetDict`. This would apply a function on a give item but when the item is requested. Two use cases:

1. load image on the fly
2. apply a random function and get different outputs at each epoch (like data augmentation or randomly masking a part of a sentence for BERT-like objectives).