Huggingface-hub has recently added support for the /api/validate-yaml endpoint from version 0.21.0, which is used as part of the uploading process in general, and also when uploading Hugging Face modules to Artifactory.
Therefore, you may encounter the following Hugging Face client error when uploading modules to the Hugging Face local or virtual repository in Artifactory:
requests.exceptions.HTTPError: 404 Client Error: for url: https://<Artifactory-hostname>/artifactory/api/huggingfaceml/<hugging-face-repository-name>/api/validate-yaml
This error can also be found in the artifactory-request.log:
04-30T20:13:14.546Z|e24844df9a33b978|IP|user|POST|/api/huggingfaceml/<hugging-face-repository-name>/api/validate-yaml|404|8712|0|18|unknown/None; hf_hub/0.22.2; python/3.12.3
The support for this endpoint has been added in Artifactory version 7.83 (see release notes here) and is available for self-hosted customers from version 7.84.10 onwards. To overcome these errors, you may proceed with one of the following:
- Downgrade the huggingface-hub client version to lower than 0.21.0.
- Upgrade your Artifactory instance to version 7.84.10 or higher.