This topic describes how to resolve Hugging Face models and datasets from within Artifactory. Artifactory supports resolving datasets starting from version 7.90.x.
To resolve a model from Artifactory, run the following command:
Note
Resolving models from Artifactory might take a while due to the size of the models.
Note
Make sure to replace the placeholder in angle brackets (<>) with your own model/ dataset name and revision number.
from huggingface_hub import snapshot_download snapshot_download( repo_id="<MODEL_NAME>", revision="<MODEL_UUID>" )
For example:
from huggingface_hub import snapshot_download snapshot_download( repo_id="nsi319/legalpegasus", revision="54ef2872d33bbff28eb09544bdecbf6699f5b0b8" )
To resolve a dataset from Artifactory, run the following command:
Note
Make sure to replace the placeholder in angle brackets (<>) with your own model/ dataset name and revision number.
from huggingface_hub import snapshot_download snapshot_download( repo_id="<DATASET_NAME>", revision="<DATASET_UUID>", repo_type="dataset" )
To find the revision ID for a model or dataset on Hugging Face Hub:
In the model or dataset page, go to the Files and versions tab.
Click the History button on the top right-hand side. This page contains the commit history of the model or dataset, each with its own Git commit revision ID.
Click the copy icon to copy the full commit hash to your clipboard.