[METRICS] Various improvements on metrics
MEMBER
The cast function is now called inside `features.encode_example`.
I also added `encode_batch` that was missing.

Moreover I used the cast function in `Dataset.map` to support torch/tensorflow tensors or numpy arrays inputs.

There are tests for tensors inputs in metrics and in .map
2020-08-12T15:53:04Z
https://github.com/huggingface/datasets/pull/466#issuecomment-672958561
https://api.github.com/repos/huggingface/datasets/issues/466
MDEyOklzc3VlQ29tbWVudDY3Mjk1ODU2MQ==
https://api.github.com/repos/huggingface/datasets/issues/comments/672958561/reactions
2020-08-12T15:53:04Z
https://api.github.com/repos/huggingface/datasets/issues/comments/672958561
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
MEMBER
I think we can merge
2020-08-17T15:14:54Z
https://github.com/huggingface/datasets/pull/466#issuecomment-674941698
https://api.github.com/repos/huggingface/datasets/issues/466
MDEyOklzc3VlQ29tbWVudDY3NDk0MTY5OA==
https://api.github.com/repos/huggingface/datasets/issues/comments/674941698/reactions
2020-08-17T15:14:54Z
https://api.github.com/repos/huggingface/datasets/issues/comments/674941698
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
- Disallow the use of positional arguments to avoid `predictions` vs `references` mistakes
- Allow to directly feed numpy/pytorch/tensorflow/pandas objects in metrics