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

Send user_agent in HEAD calls #1854

Merged
merged 3 commits into from
Nov 22, 2023
Merged

Send user_agent in HEAD calls #1854

merged 3 commits into from
Nov 22, 2023

Conversation

Wauplin
Copy link
Contributor

@Wauplin Wauplin commented Nov 22, 2023

It looks like for the past 14 months we were not sending the user agent in the HEAD call when downloading a file thanks to a change I made in #1058...

Thanks @patrickvonplaten for reporting (private slack thread). This means we don't have user_agent (i.e. library_name/version + additional information like pipeline_class) in our stats when model files are already cached. This PR fixes it and adds a regression test for it.

cc @julien-c @osanseviero weird that we haven't found out about it before.

(also, deprecate http_user_agent -a completely unused method- + add get_hf_file_metadata to HfApi -it wasn't there before-)

@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented Nov 22, 2023

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

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.

Thank you for the quick fix @Wauplin

@Wauplin Wauplin merged commit 5d69111 into main Nov 22, 2023
14 of 16 checks passed
@Wauplin Wauplin deleted the fix-user-agent-in-downloads branch November 22, 2023 17:35
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