-
Notifications
You must be signed in to change notification settings - Fork 610
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
path in HF_ENDPOINT discarded in v0.28.0 #2806
Comments
Hi @anael-l , thanks for reporting. This is indeed a breaking change that should be fixed. You've indeed spotted the root cause of this error. Would you mind opening a PR to replace the two |
Hello @Wauplin, thanks for the fast reply, I can do a PR.
Indeed, the path in templated in
I think that's why before using Should I just replace the two urljoin with string concat again ? |
Yes perfect! That was an oversight from me. I just approved the PR :) |
@anael-l I just published a 0.28.1 release with your fix: https://github.com/huggingface/huggingface_hub/releases/tag/v0.28.1. Thanks again for your help! |
Thank you for being so reactive ! |
Describe the bug
Hi,
We are using Artifactory to proxy the download of models from HuggingFace.
We set the
HF_ENDPOINT
env var tohttps://<artifactory-host>/artifactory/api/huggingfaceml/huggingface-ml-external
for the lib to connect directly to Artifactory.When using this config in the version 0.27.1, we can see in the lib debug logs that the correct endpoint is used to download
However, since version
0.28.0
, the needed path/artifactory/api/huggingfaceml/huggingface-ml-external/
in our request URL is removed, which results in a 404I think this difference comes from this change: 438f2fb#diff-b9ea02465324089a58bcb914a78b6c50143dfa0aadf772cef27478581f1346bcR71
Where instead of concatenating the model path to the
HF_ENDPOINT
var, it usesurljoin
. which as I tested, removes the path after the hostnameResult:
https://artifactory-host/{repo_id}/resolve/{revision}/{filename}
Would it be possible to revert this change, or to make it work with
HF_ENDPOINT
endpoints that contain path ?Thank you in advance
Reproduction
Described above
Logs
System info
The text was updated successfully, but these errors were encountered: