As of Artifactory 7.111.1, all new Hugging Face repositories use the Machine Learning Repository Structure. Migrate your repositories to the new structure to ensure the most up-to-date features and functionality.
Prerequisite: Administrator user
To migrate a Hugging Face repository from the legacy layout to the Machine Learning layout:
In Artifactory, select the Administration tab and go to Repositories.
In the Repositories list, find the Hugging Face repository on which you want to perform the migration.
Go to the right end of the row of the repository and click the three dots
at the end of the row. An Actions pop-up menu appears, as shown below.
In the Actions pop-up menu, click Upgrade Repository Layout. The following upgrade notice appears:
Click Upgrade in the upgrade message. After you click Upgrade, the upgrade message disappears and in the Repositories list a popup message is briefly displayed stating: "Layout convert for HuggingFace repository
<repo-name>completed with result: Conversion for repo<repo-name>done."
Restore the Legacy Layout
Note
Only restore the legacy layout as a remediation measure if migration to the new layout fails.
In case of migration failure or other technical issues, you can restore the legacy layout by calling the REST API.
Usage: POST http://<YOUR_DOMAIN>/artifactory/api/artifactactions/restore_layout
Query Parameters:
Field | Description |
|---|---|
| The repository key. |
| This parameter should always have the value HuggingFaceML. |
When this API call is successful, a 200 success message is returned with the message: "Restore layout for HuggingFaceML repository <repository_key> completed with result: Restore layout for repo <repository_key> done."
Limitations and Considerations
The process for migrating Hugging Face repositories from the legacy layout to the Machine Learning layout has the following limitations:
Federated/replicated repositories: Machine Learning repositories cannot be federated to legacy Hugging Face repositories. The layouts are not compatible. To maintain federation in this situation, verify the following before migration:
All topology members are at least on Artifactory version 7.111.x.
Replication or federation is paused.
The queue is empty.
Migrate all topology instances before resuming replication or federation.
Limitation on the Restore Layout API: The restore capability only applies to content that was saved during the migration process. When migrating to the new layout, Artifactory generates a snapshot of your existing repositories. This means that if you migrate to the new layout and then add packages to the repository, if you choose to restore the old layout the newly added packages will be deleted and the snapshot of the old layout will be restored. So there can be data loss when restoring.