Better error msg if `len(predictions)` doesn't match `len(references)` in metrics
CONTRIBUTOR
Can't test this now but it may be a good improvement indeed.
2021-10-26T09:37:48Z
https://github.com/huggingface/datasets/pull/3160#issuecomment-951761947
https://api.github.com/repos/huggingface/datasets/issues/3160
IC_kwDODunzps44urwb
https://api.github.com/repos/huggingface/datasets/issues/comments/951761947/reactions
2021-10-26T09:37:48Z
https://api.github.com/repos/huggingface/datasets/issues/comments/951761947
https://avatars.githubusercontent.com/u/2779410?v=4
https://api.github.com/users/BramVanroy/events{/privacy}
https://api.github.com/users/BramVanroy/followers
https://api.github.com/users/BramVanroy/following{/other_user}
https://api.github.com/users/BramVanroy/gists{/gist_id}
https://github.com/BramVanroy
BramVanroy
MDQ6VXNlcjI3Nzk0MTA=
https://api.github.com/users/BramVanroy/orgs
https://api.github.com/users/BramVanroy/received_events
https://api.github.com/users/BramVanroy/repos
https://api.github.com/users/BramVanroy/starred{/owner}{/repo}
https://api.github.com/users/BramVanroy/subscriptions
User
https://api.github.com/users/BramVanroy
public
COLLABORATOR
I added a function, but it only works with the `list` type. For arrays/tensors, we delegate formatting to the frameworks. 
2021-11-04T16:12:56Z
https://github.com/huggingface/datasets/pull/3160#issuecomment-961195264
https://api.github.com/repos/huggingface/datasets/issues/3160
IC_kwDODunzps45Sq0A
https://api.github.com/repos/huggingface/datasets/issues/comments/961195264/reactions
2021-11-04T16:12:56Z
https://api.github.com/repos/huggingface/datasets/issues/comments/961195264
https://avatars.githubusercontent.com/u/47462742?v=4
https://api.github.com/users/mariosasko/events{/privacy}
https://api.github.com/users/mariosasko/followers
https://api.github.com/users/mariosasko/following{/other_user}
https://api.github.com/users/mariosasko/gists{/gist_id}
https://github.com/mariosasko
mariosasko
MDQ6VXNlcjQ3NDYyNzQy
https://api.github.com/users/mariosasko/orgs
https://api.github.com/users/mariosasko/received_events
https://api.github.com/users/mariosasko/repos
https://api.github.com/users/mariosasko/starred{/owner}{/repo}
https://api.github.com/users/mariosasko/subscriptions
User
https://api.github.com/users/mariosasko
public
Improve the error message in `Metric.add_batch` if `len(predictions)` doesn't match `len(references)`.

cc: @BramVanroy (feel free to test this code on your examples and review this PR)