Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

inspect functions can't fetch dataset script from the Hub #4348

Closed
stevhliu opened this issue May 13, 2022 · 2 comments · Fixed by #4433
Closed

inspect functions can't fetch dataset script from the Hub #4348

stevhliu opened this issue May 13, 2022 · 2 comments · Fixed by #4433
Assignees
Labels
bug Something isn't working

Comments

@stevhliu
Copy link
Member

The inspect_dataset and inspect_metric functions are unable to retrieve a dataset or metric script from the Hub and store it locally at the specified local_path:

>>> from datasets import inspect_dataset
>>> inspect_dataset('rotten_tomatoes', local_path='path/to/my/local/folder')

FileNotFoundError: Couldn't find a dataset script at /content/rotten_tomatoes/rotten_tomatoes.py or any data file in the same directory.
@stevhliu stevhliu added the bug Something isn't working label May 13, 2022
@mariosasko
Copy link
Collaborator

Hi, thanks for reporting! git bisect points to #2986 as the PR that introduced the bug. Since then, there have been some additional changes to the loading logic, and in the current state, force_local_path (set via local_path) forbids pulling a script from the internet instead of downloading it:

dataset_module = dataset_module_factory(
path, download_config=download_config, force_local_path=local_path, **download_kwargs
)

cc @lhoestq: force_local_path is only used in inspect_dataset and inspect_metric. Is it OK if we revert the behavior to match the old one?

@lhoestq
Copy link
Member

lhoestq commented May 25, 2022

Good catch ! Yea I think it's fine :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
3 participants