ARTIFACTORY: How to resolve the issue where the “Store Artifacts Locally” option is disabled in a HuggingFace remote repository, causing an inability to resolve models

ARTIFACTORY: How to resolve the issue where the “Store Artifacts Locally” option is disabled in a HuggingFace remote repository, causing an inability to resolve models

AuthorFullName__c
Yonatan Hen
articleNumber
000006131
ft:sourceType
Salesforce
FirstPublishedDate
2024-06-26T06:54:28Z
lastModifiedDate
2024-06-26
VersionNumber
2
Description:
When resolving some models from a HuggingFace remote repository and disabling the ”Store Artifacts Locally” option in the repository, a ‘404 Not Found’ error is returned and the model is not being downloaded.

For illustration, you may encounter the following error from the HuggingFace client when trying to resolve models with the setup in question:
python3 download.py -vvv

raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 404 Client Error: Not Found for url: http://<hostname>/artifactory/api/huggingfaceml/<hugging-face-remote-repository-name>/api/models/bigscience/bigscience-small-testing/revision/mai
download.py content:
from huggingface_hub import snapshot_download

snapshot_download(
    repo_id="bigscience/bigscience-small-testing", revision="main", etag_timeout=1500000000,
    cache_dir="./huggingface_mirror"
)

Artifactory logs from the time of the error above:

artifactory-request-out.log:
2024-06-16T21:39:01.916Z|4ca87e00b17bf815|hugging-face-remote||HEAD|https://huggingface.co/api/models/bigscience/bigscience-small-testing/revision/main|200|0|1422|206
2024-06-16T21:39:02.015Z|4ca87e00b17bf815|hugging-face-remote||GET|https://huggingface.co/api/models/bigscience/bigscience-small-testing/revision/main|200|0|1422|97

artifactory-request.log:
2024-06-16T21:39:02.019Z|4ca87e00b17bf815|<IP>|<Username>|GET|/api/huggingfaceml/hugging-face-remote/api/models/bigscience/bigscience-small-testing/revision/main|404|-1|0|339|unknown/None; hf_hub/0.23.0; python/3.11.6

artifactory-service.log:
2024-06-16T21:39:02.016Z [jfrt ] [INFO ] [4ca87e00b17bf815] [o.a.r.HttpRepo:464            ] [http-nio-8081-exec-6] - hugging-face-remote downloading https://huggingface.co/api/models/bigscience/bigscience-small-testing/revision/main 1.39 KB
2024-06-16T21:39:02.017Z [jfrt ] [ERROR] [4ca87e00b17bf815] [c.MlModelInfoRemoteCommand:234] [http-nio-8081-exec-6] - Could not copy latest model info to timestamp folder:models/bigscience/bigscience-small-testing/main/2023-03-24T08:39:39.000Z/.jfrog_huggingface_model_info.json, repoKey:hugging-face-remote, modelId:bigscience/bigscience-small-testing, revision:main, message:Not found