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

Add timeout to dataset_info #373

Merged
merged 1 commit into from
Sep 30, 2021
Merged

Conversation

lhoestq
Copy link
Member

@lhoestq lhoestq commented Sep 29, 2021

In certain environments such as the Jean Zay cluster, there is no internet connection and internet requests hang indefinitely.

To be able to properly raise an error in such cases instead of making the program hang, I think it would be nice to add a timeout parameter to HfApi.dataset_info that can be passed to requests.get.

I added timeout to HfApi.dataset_info and also HfApi.model_info for consistency

Close #372

Related to the new integration of dataset_info in datasets at huggingface/datasets#2986

Copy link
Member

@LysandreJik LysandreJik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Thank you, @lhoestq!

@LysandreJik LysandreJik merged commit bd990f2 into main Sep 30, 2021
@LysandreJik LysandreJik deleted the add-timeout-to-daatset_info branch September 30, 2021 19:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add timeout parameter to HfApi.dataset_info to work on JZ
2 participants