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

Adding the ability to configure the timeout of get request #1720

Merged
merged 12 commits into from
Oct 12, 2023

Conversation

Shahafgo
Copy link
Contributor

@Shahafgo Shahafgo commented Oct 9, 2023

This PR purpose is to adding the ability to configure the timeout of requests during the download file operation

Copy link
Contributor

@Wauplin Wauplin left a comment

Choose a reason for hiding this comment

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

Hey @Shahafgo! Thanks for this very clean PR!
I reviewed and made some small comments. Mostly to add a bit more explanation in the docs + remove some duplicated logic. I like how you separated default value and user value. Looks good overall :)

docs/source/en/package_reference/environment_variables.md Outdated Show resolved Hide resolved
docs/source/en/package_reference/environment_variables.md Outdated Show resolved Hide resolved
src/huggingface_hub/_snapshot_download.py Outdated Show resolved Hide resolved
src/huggingface_hub/file_download.py Outdated Show resolved Hide resolved
src/huggingface_hub/file_download.py Outdated Show resolved Hide resolved
src/huggingface_hub/file_download.py Outdated Show resolved Hide resolved
src/huggingface_hub/hf_api.py Outdated Show resolved Hide resolved
src/huggingface_hub/hf_api.py Outdated Show resolved Hide resolved
Comment on lines +318 to +319
info["HF_HUB_ETAG_TIMEOUT"] = constants.HF_HUB_ETAG_TIMEOUT
info["HF_HUB_DOWNLOAD_TIMEOUT"] = constants.HF_HUB_DOWNLOAD_TIMEOUT
Copy link
Contributor

Choose a reason for hiding this comment

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

Really like this, thank you!

Shahafgo and others added 8 commits October 10, 2023 21:57
Update HF_HUB_ETAG_TIMEOUT documentation

Co-authored-by: Lucain <lucainp@gmail.com>
Update HF_HUB_DOWNLOAD_TIMEOUT documentation

Co-authored-by: Lucain <lucainp@gmail.com>
Co-authored-by: Lucain <lucainp@gmail.com>
Co-authored-by: Lucain <lucainp@gmail.com>
Co-authored-by: Lucain <lucainp@gmail.com>
Co-authored-by: Lucain <lucainp@gmail.com>
Co-authored-by: Lucain <lucainp@gmail.com>
Co-authored-by: Lucain <lucainp@gmail.com>
Copy link
Contributor

@Wauplin Wauplin left a comment

Choose a reason for hiding this comment

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

All good!
Spotted 2 typos but otherwise let's merge this 🚀

src/huggingface_hub/_snapshot_download.py Outdated Show resolved Hide resolved
src/huggingface_hub/file_download.py Outdated Show resolved Hide resolved
src/huggingface_hub/file_download.py Outdated Show resolved Hide resolved
@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented Oct 12, 2023

The documentation is not available anymore as the PR was closed or merged.

@Wauplin Wauplin merged commit 5a4eab0 into huggingface:main Oct 12, 2023
14 checks passed
@Wauplin
Copy link
Contributor

Wauplin commented Oct 12, 2023

And it's merged! Thanks for the work @Shahafgo ! 🚀

@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint.

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.

3 participants