Better ImportError message when a dataset script dependency is missing
NONE
_The documentation is not available anymore as the PR was closed or merged._
2022-06-13T12:51:02Z
https://github.com/huggingface/datasets/pull/4484#issuecomment-1153875066
https://api.github.com/repos/huggingface/datasets/issues/4484
IC_kwDODunzps5Exrx6
https://api.github.com/repos/huggingface/datasets/issues/comments/1153875066/reactions
2022-06-13T14:00:31Z
https://api.github.com/repos/huggingface/datasets/issues/comments/1153875066
https://avatars.githubusercontent.com/u/99929124?v=4
https://api.github.com/users/HuggingFaceDocBuilderDev/events{/privacy}
https://api.github.com/users/HuggingFaceDocBuilderDev/followers
https://api.github.com/users/HuggingFaceDocBuilderDev/following{/other_user}
https://api.github.com/users/HuggingFaceDocBuilderDev/gists{/gist_id}
https://github.com/HuggingFaceDocBuilderDev
HuggingFaceDocBuilderDev
U_kgDOBfTMJA
https://api.github.com/users/HuggingFaceDocBuilderDev/orgs
https://api.github.com/users/HuggingFaceDocBuilderDev/received_events
https://api.github.com/users/HuggingFaceDocBuilderDev/repos
https://api.github.com/users/HuggingFaceDocBuilderDev/starred{/owner}{/repo}
https://api.github.com/users/HuggingFaceDocBuilderDev/subscriptions
User
https://api.github.com/users/HuggingFaceDocBuilderDev
public
MEMBER
Discussed offline with @mariosasko, merging :)
2022-06-13T13:50:43Z
https://github.com/huggingface/datasets/pull/4484#issuecomment-1153941214
https://api.github.com/repos/huggingface/datasets/issues/4484
IC_kwDODunzps5Ex77e
https://api.github.com/repos/huggingface/datasets/issues/comments/1153941214/reactions
2022-06-13T13:50:43Z
https://api.github.com/repos/huggingface/datasets/issues/comments/1153941214
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
NONE
Fwiw, i think this same issue is occurring on the datasets website page, where preview isn't available due to the `bigbench` import error
2022-07-08T09:50:03Z
https://github.com/huggingface/datasets/pull/4484#issuecomment-1178786444
https://api.github.com/repos/huggingface/datasets/issues/4484
IC_kwDODunzps5GQtqM
https://api.github.com/repos/huggingface/datasets/issues/comments/1178786444/reactions
2022-07-08T09:50:03Z
https://api.github.com/repos/huggingface/datasets/issues/comments/1178786444
https://avatars.githubusercontent.com/u/26286291?v=4
https://api.github.com/users/thesofakillers/events{/privacy}
https://api.github.com/users/thesofakillers/followers
https://api.github.com/users/thesofakillers/following{/other_user}
https://api.github.com/users/thesofakillers/gists{/gist_id}
https://github.com/thesofakillers
thesofakillers
MDQ6VXNlcjI2Mjg2Mjkx
https://api.github.com/users/thesofakillers/orgs
https://api.github.com/users/thesofakillers/received_events
https://api.github.com/users/thesofakillers/repos
https://api.github.com/users/thesofakillers/starred{/owner}{/repo}
https://api.github.com/users/thesofakillers/subscriptions
User
https://api.github.com/users/thesofakillers
public
MEMBER
For the preview of BigBench datasets, we're just waiting for bigbench to have a stable version on PyPI, instead of the one hosted on GCS ;)
2022-07-08T14:30:44Z
https://github.com/huggingface/datasets/pull/4484#issuecomment-1179055573
https://api.github.com/repos/huggingface/datasets/issues/4484
IC_kwDODunzps5GRvXV
https://api.github.com/repos/huggingface/datasets/issues/comments/1179055573/reactions
2022-07-08T14:30:44Z
https://api.github.com/repos/huggingface/datasets/issues/comments/1179055573
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
When a depenency is missing for a dataset script, an ImportError message is shown, with a tip to install the missing dependencies. This message is not ideal at the moment: it may show duplicate dependencies, and is not very readable.

I improved it from
```
ImportError: To be able to use bigbench, you need to install the following dependencies['bigbench', 'bigbench', 'bigbench', 'bigbench'] using 'pip install "bigbench @ https://storage.googleapis.com/public_research_data/bigbench/bigbench-0.0.1.tar.gz" bigbench bigbench bigbench' for instance'
```
to
```
ImportError: To be able to use bigbench, you need to install the following dependency: bigbench.
Please install it using 'pip install "bigbench @ https://storage.googleapis.com/public_research_data/bigbench/bigbench-0.0.1.tar.gz"' for instance'
```