Skip to content

The api /api/models/<namespace>/<modelname>/revision/<revision>?expand=xetEnabled doesnt work in private repository #2974

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

Open
Shahafgo opened this issue Apr 2, 2025 · 7 comments

Comments

@Shahafgo
Copy link
Contributor

Shahafgo commented Apr 2, 2025

I am working with private repository of huggingface and latest client version (I think 0.30.0) starts to send the request for fetching revision information with the query param expand=xetEnabled and it makes the private repository to return 404.
Currently the private repository does'nt know this api, and I can work with the latest version.

@Shahafgo Shahafgo changed the title The api https://huggingface.co/api/models/<namespace>/<modelname>/revision/<revision>?expand=xetEnabled doesnt work in private repository The api /api/models/<namespace>/<modelname>/revision/<revision>?expand=xetEnabled doesnt work in private repository Apr 2, 2025
@Wauplin
Copy link
Contributor

Wauplin commented Apr 2, 2025

Hey @Shahafgo, sorry for the inconvenience. Can you share the stacktrace you are getting?

@Shahafgo
Copy link
Contributor Author

Shahafgo commented Apr 2, 2025

@Wauplin Hi I dont think stacktrace will help here, my private repository is a local-repo in Artifactory and it seems that I am getting 404 from Artifactory:

It looks like Artifactory doesnt accept the request with the query param of expand=xetEnabled.
Can you please explain to me Why it is needed and if it is was added to the url on purpose?

@Wauplin
Copy link
Contributor

Wauplin commented Apr 3, 2025

@Shahafgo stacktrace is usually the primary information to provide when reporting a bug. Sometimes it's possible to just describe the error but it usually takes more time and back and forth replies to investigate a given bug. Here for example the key information is that you are using an Artifactory, which we don't officially support - and therefore haven't tested against. Also a stacktrace helps knowing which part of the code must be looked into (e.g. you haven't provided information about whether you are trying to upload or to download from the repo - which would be present in the stacktrace).


That being said, I'll soon make a PR to make the xetEnabled check optional so that it works when downloading from an Artifactory. I'll keep you posted.

@Wauplin
Copy link
Contributor

Wauplin commented Apr 3, 2025

Ongoing PR: #2975

@Shahafgo
Copy link
Contributor Author

Shahafgo commented Apr 3, 2025

@Wauplin Hi, thanks for the quick response, I will send the stacktrace

@Shahafgo
Copy link
Contributor Author

Shahafgo commented Apr 3, 2025

@Wauplin this is the stacktrace:

!uploadResult= api.upload_folder(

EThe above exception was the direct cause of the following exception:

#Traceback (most recent call last):
< File "/huggingface/entity_upload.py", line 3, in
% uploadResult= api.upload_folder(
n File "/usr/local/lib/python3.10/dist-packages/huggingface_hub/utils/_validators.py", line 114, in _inner_fn
� return fn(*args, **kwargs)
a File "/usr/local/lib/python3.10/dist-packages/huggingface_hub/hf_api.py", line 1624, in _inner
% return fn(self, *args, **kwargs)
h File "/usr/local/lib/python3.10/dist-packages/huggingface_hub/hf_api.py", line 4934, in upload_folder
& commit_info = self.create_commit(
n File "/usr/local/lib/python3.10/dist-packages/huggingface_hub/utils/_validators.py", line 114, in _inner_fn
� return fn(*args, **kwargs)
a File "/usr/local/lib/python3.10/dist-packages/huggingface_hub/hf_api.py", line 1624, in _inner
% return fn(self, *args, **kwargs)
h File "/usr/local/lib/python3.10/dist-packages/huggingface_hub/hf_api.py", line 4193, in create_commit
� self.preupload_lfs_files(
n File "/usr/local/lib/python3.10/dist-packages/huggingface_hub/hf_api.py", line 4462, in preupload_lfs_files
" xet_enabled = self.repo_info(
n File "/usr/local/lib/python3.10/dist-packages/huggingface_hub/utils/_validators.py", line 114, in _inner_fn
� return fn(*args, **kwargs)
d File "/usr/local/lib/python3.10/dist-packages/huggingface_hub/hf_api.py", line 2807, in repo_info
� return method(
n File "/usr/local/lib/python3.10/dist-packages/huggingface_hub/utils/_validators.py", line 114, in _inner_fn
� return fn(*args, **kwargs)
e File "/usr/local/lib/python3.10/dist-packages/huggingface_hub/hf_api.py", line 2592, in model_info
� hf_raise_for_status(r)
r File "/usr/local/lib/python3.10/dist-packages/huggingface_hub/utils/_http.py", line 482, in hf_raise_for_status
; raise _format(HfHubHTTPError, str(e), response) from e
�huggingface_hub.errors.HfHubHTTPError: 404 Client Error: for url: http://10.0.0.8:8081/artifactory/api/huggingfaceml/huggingfaceml-local/api/models/sentence-transformers/paraphrase-MiniLM-L3-v2/revision/main?expand=xetEnabled

@Shahafgo
Copy link
Contributor Author

Shahafgo commented Apr 3, 2025

It looks like while uploading this request is sent.
When I am to send the request api/models///revision/?expand=xetEnabled with packages that are already stored in Artifactory we get 200 ok response.

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 a pull request may close this issue.

2 participants