Raise exceptions instead of using assertions for control flow
CONTRIBUTOR
Adding the remaining tasks for this issue to help new code contributors.  
$ cd src/datasets && ack assert -lc 
- [x] commands/convert.py:1
- [x] arrow_reader.py:3
- [x] load.py:7
- [x] utils/py_utils.py:2
- [x] features/features.py:9
- [x] arrow_writer.py:7
- [x] search.py:6
- [x] table.py:1
- [x] metric.py:3
- [x] tasks/image_classification.py:1
- [x] arrow_dataset.py:17
- [x] fingerprint.py:6
- [x] io/json.py:1
- [x] io/csv.py:1
2021-11-12T15:18:01Z
https://github.com/huggingface/datasets/issues/3171#issuecomment-967195990
https://api.github.com/repos/huggingface/datasets/issues/3171
IC_kwDODunzps45pj1W
https://api.github.com/repos/huggingface/datasets/issues/comments/967195990/reactions
2021-12-01T01:38:25Z
https://api.github.com/repos/huggingface/datasets/issues/comments/967195990
https://avatars.githubusercontent.com/u/153142?v=4
https://api.github.com/users/manisnesan/events{/privacy}
https://api.github.com/users/manisnesan/followers
https://api.github.com/users/manisnesan/following{/other_user}
https://api.github.com/users/manisnesan/gists{/gist_id}
https://github.com/manisnesan
manisnesan
MDQ6VXNlcjE1MzE0Mg==
https://api.github.com/users/manisnesan/orgs
https://api.github.com/users/manisnesan/received_events
https://api.github.com/users/manisnesan/repos
https://api.github.com/users/manisnesan/starred{/owner}{/repo}
https://api.github.com/users/manisnesan/subscriptions
User
https://api.github.com/users/manisnesan
public
CONTRIBUTOR
Hi all,
I am interested in taking up `fingerprint.py`, `search.py`, `arrow_writer.py` and `metric.py`. Will raise a PR soon!
2021-11-19T11:40:15Z
https://github.com/huggingface/datasets/issues/3171#issuecomment-973999138
https://api.github.com/repos/huggingface/datasets/issues/3171
IC_kwDODunzps46Dgwi
https://api.github.com/repos/huggingface/datasets/issues/comments/973999138/reactions
2021-11-19T11:40:15Z
https://api.github.com/repos/huggingface/datasets/issues/comments/973999138
https://avatars.githubusercontent.com/u/46553104?v=4
https://api.github.com/users/Ishan-Kumar2/events{/privacy}
https://api.github.com/users/Ishan-Kumar2/followers
https://api.github.com/users/Ishan-Kumar2/following{/other_user}
https://api.github.com/users/Ishan-Kumar2/gists{/gist_id}
https://github.com/Ishan-Kumar2
Ishan-Kumar2
MDQ6VXNlcjQ2NTUzMTA0
https://api.github.com/users/Ishan-Kumar2/orgs
https://api.github.com/users/Ishan-Kumar2/received_events
https://api.github.com/users/Ishan-Kumar2/repos
https://api.github.com/users/Ishan-Kumar2/starred{/owner}{/repo}
https://api.github.com/users/Ishan-Kumar2/subscriptions
User
https://api.github.com/users/Ishan-Kumar2
public
CONTRIBUTOR
Let me look into `arrow_dataset.py`, `table.py`, `data_files.py` & `features.py` 
2021-11-23T04:35:51Z
https://github.com/huggingface/datasets/issues/3171#issuecomment-976162601
https://api.github.com/repos/huggingface/datasets/issues/3171
IC_kwDODunzps46Lw8p
https://api.github.com/repos/huggingface/datasets/issues/comments/976162601/reactions
2021-11-23T04:35:51Z
https://api.github.com/repos/huggingface/datasets/issues/comments/976162601
https://avatars.githubusercontent.com/u/153142?v=4
https://api.github.com/users/manisnesan/events{/privacy}
https://api.github.com/users/manisnesan/followers
https://api.github.com/users/manisnesan/following{/other_user}
https://api.github.com/users/manisnesan/gists{/gist_id}
https://github.com/manisnesan
manisnesan
MDQ6VXNlcjE1MzE0Mg==
https://api.github.com/users/manisnesan/orgs
https://api.github.com/users/manisnesan/received_events
https://api.github.com/users/manisnesan/repos
https://api.github.com/users/manisnesan/starred{/owner}{/repo}
https://api.github.com/users/manisnesan/subscriptions
User
https://api.github.com/users/manisnesan
public
CONTRIBUTOR
All the tasks are completed for this issue. This can be closed. 
2021-12-23T14:59:17Z
https://github.com/huggingface/datasets/issues/3171#issuecomment-1000358729
https://api.github.com/repos/huggingface/datasets/issues/3171
IC_kwDODunzps47oENJ
https://api.github.com/repos/huggingface/datasets/issues/comments/1000358729/reactions
2021-12-23T14:59:17Z
https://api.github.com/repos/huggingface/datasets/issues/comments/1000358729
https://avatars.githubusercontent.com/u/153142?v=4
https://api.github.com/users/manisnesan/events{/privacy}
https://api.github.com/users/manisnesan/followers
https://api.github.com/users/manisnesan/following{/other_user}
https://api.github.com/users/manisnesan/gists{/gist_id}
https://github.com/manisnesan
manisnesan
MDQ6VXNlcjE1MzE0Mg==
https://api.github.com/users/manisnesan/orgs
https://api.github.com/users/manisnesan/received_events
https://api.github.com/users/manisnesan/repos
https://api.github.com/users/manisnesan/starred{/owner}{/repo}
https://api.github.com/users/manisnesan/subscriptions
User
https://api.github.com/users/manisnesan
public
Motivated by https://github.com/huggingface/transformers/issues/12789 in Transformers, one welcoming change would be replacing assertions with proper exceptions. The only type of assertions we should keep are those used as sanity checks.

Currently, there is a total of 87 files with the `assert` statements (located under `datasets` and `src/datasets`), so when working on this, to manage the PR size, only modify 4-5 files at most before submitting a PR.