Use IndexError instead of ValueError when index out of range
{'login': 'richarddwang', 'id': 17963619, 'node_id': 'MDQ6VXNlcjE3OTYzNjE5', 'avatar_url': 'https://avatars.githubusercontent.com/u/17963619?v=4', 'gravatar_id': '', 'url': 'https://api.github.com/users/richarddwang', 'html_url': 'https://github.com/richarddwang', 'followers_url': 'https://api.github.com/users/richarddwang/followers', 'following_url': 'https://api.github.com/users/richarddwang/following{/other_user}', 'gists_url': 'https://api.github.com/users/richarddwang/gists{/gist_id}', 'starred_url': 'https://api.github.com/users/richarddwang/starred{/owner}{/repo}', 'subscriptions_url': 'https://api.github.com/users/richarddwang/subscriptions', 'organizations_url': 'https://api.github.com/users/richarddwang/orgs', 'repos_url': 'https://api.github.com/users/richarddwang/repos', 'events_url': 'https://api.github.com/users/richarddwang/events{/privacy}', 'received_events_url': 'https://api.github.com/users/richarddwang/received_events', 'type': 'User', 'site_admin': False}
[]
[]
**`default __iter__ needs IndexError`**.

When I want to create a wrapper of arrow dataset to adapt to fastai,
I don't know how to initialize it, so I didn't use inheritance but use object composition.
I wrote sth like this.
```
clas HF_dataset():
  def __init__(self, arrow_dataset):
    self.dset = arrow_dataset
  def __getitem__(self, i):
    return self.my_get_item(self.dset)
```
But `for sample in my_dataset:` gave me `ValueError(f"Index ({key}) outside of table length ({self._data.num_rows}).")` . This is because default `__iter__` will stop when it catched `IndexError`.

You can also see my [work](https://github.com/richardyy1188/Pretrain-MLM-and-finetune-on-GLUE-with-fastai/blob/master/GLUE_with_fastai.ipynb) that uses fastai2 to show/load batches from huggingface/nlp GLUE datasets

So I hope we can use `IndexError` instead to let other people who want to wrap it for any purpose won't be caught by this caveat.

BTW, I super appreciate your work, both transformers and nlp save my life. 💖💖💖💖💖💖💖


{'url': 'https://api.github.com/repos/huggingface/datasets/issues/184/reactions', 'total_count': 0, '+1': 0, '-1': 0, 'laugh': 0, 'hooray': 0, 'confused': 0, 'heart': 0, 'rocket': 0, 'eyes': 0}
{'url': 'https://api.github.com/repos/huggingface/datasets/pulls/184', 'html_url': 'https://github.com/huggingface/datasets/pull/184', 'diff_url': 'https://github.com/huggingface/datasets/pull/184.diff', 'patch_url': 'https://github.com/huggingface/datasets/pull/184.patch', 'merged_at': '2020-05-28T08:31:18Z'}