Add a `lazy_map` method to `Dataset` and `DatasetDict`
{'login': 'sgugger', 'id': 35901082, 'node_id': 'MDQ6VXNlcjM1OTAxMDgy', 'avatar_url': 'https://avatars.githubusercontent.com/u/35901082?v=4', 'gravatar_id': '', 'url': 'https://api.github.com/users/sgugger', 'html_url': 'https://github.com/sgugger', 'followers_url': 'https://api.github.com/users/sgugger/followers', 'following_url': 'https://api.github.com/users/sgugger/following{/other_user}', 'gists_url': 'https://api.github.com/users/sgugger/gists{/gist_id}', 'starred_url': 'https://api.github.com/users/sgugger/starred{/owner}{/repo}', 'subscriptions_url': 'https://api.github.com/users/sgugger/subscriptions', 'organizations_url': 'https://api.github.com/users/sgugger/orgs', 'repos_url': 'https://api.github.com/users/sgugger/repos', 'events_url': 'https://api.github.com/users/sgugger/events{/privacy}', 'received_events_url': 'https://api.github.com/users/sgugger/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'}]
[]
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
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).
{'url': 'https://api.github.com/repos/huggingface/datasets/issues/768/reactions', 'total_count': 0, '+1': 0, '-1': 0, 'laugh': 0, 'hooray': 0, 'confused': 0, 'heart': 0, 'rocket': 0, 'eyes': 0}