Working with model registries
Working with model registries in Red Hat OpenShift AI Self-Managed
Abstract
Preface Copy linkLink copied to clipboard!
As a data scientist in OpenShift AI, you can store, share, version, deploy, and track models using the model registry feature.
Chapter 1. Overview of the model catalog and model registries Copy linkLink copied to clipboard!
The model catalog provides a curated library where data scientists and AI engineers can discover and evaluate the available generative AI (gen AI) models to find the best fit for their use cases.
A model registry acts as a central repository for administrators, data scientists, and AI engineers to register, version, and manage the lifecycle of AI models before configuring them for deployment. A model registry is a key component for AI model governance.
1.1. Model catalog Copy linkLink copied to clipboard!
Data scientists and AI engineers can use the model catalog to discover and evaluate the gen AI models that are available and ready for their organization to register, deploy, and customize.
The model catalog provides models from different providers that you can search, discover, and evaluate before you register models in a model registry and deploy them to a model serving runtime. Third-party gen AI models are benchmarked by Red Hat for performance and quality by using open-source evaluation datasets. You can compare performance metrics for specific hardware configurations and determine the most suitable option for deployment.
OpenShift AI provides a default model catalog, which includes models from providers such as Red Hat, IBM, Meta, Nvidia, Mistral AI, and Google. OpenShift AI administrators can configure the available repository sources for models displayed in the model catalog.
For more information about how data scientists and AI engineers can use the model catalog, see Working with the model catalog.
1.2. Model registry Copy linkLink copied to clipboard!
A model registry is an important component in the lifecycle of an artificial intelligence/machine learning (AI/ML) model, and is a vital part of any machine learning operations (MLOps) platform or workflow. A model registry acts as a central repository, storing metadata related to machine learning models from development to deployment. This metadata ranges from high-level information like the deployment environment and project, to specific details like training hyperparameters, performance metrics, and deployment events.
A model registry acts as a bridge between model experimentation and serving, offering a secure, collaborative metadata store interface for stakeholders in the ML lifecycle. Model registries provide a structured and organized way to store, share, version, deploy, and track models.
OpenShift AI administrators can create model registries in OpenShift AI and grant model registry access to data scientists and AI engineers. For more information, see Managing model registries.
Data scientists and AI engineers with access to a model registry can use it to store, share, version, deploy, and track models. For more information, see Working with model registries.
Chapter 2. Working with model registries Copy linkLink copied to clipboard!
2.1. Registering a model from the dashboard Copy linkLink copied to clipboard!
As a data scientist or AI engineer, you can register a model from the OpenShift AI dashboard and create the first version of the new model.
Prerequisites
- You are logged in to Red Hat OpenShift AI.
- You have access to an available model registry in your deployment.
Procedure
- From the OpenShift AI dashboard, click AI hub → Registry.
- From the Model registry drop-down list, select the model registry that you want to register a model in.
Click Register model.
The Register model dialog opens.
In the Model details section, configure details to apply to all versions of the model:
- In the Model name field, enter a name for the model.
- Optional: In the Model description field, enter a description for the model.
In the Version details section, enter details to apply to the first version of the model:
- In the Version name field, enter a name for the model version.
- Optional: In the Version description field, enter a description for the first version of the model.
-
In the Source model format field, enter the name of the model format, for example,
ONNX. - In the Source model format version field, enter the version of the model format.
In the Model location section, specify the location of the model by providing either object storage details, or a URI.
To provide object storage details, ensure that the Object storage radio button is selected.
To autofill the details of an existing connection:
- Click Autofill from connection.
- In the Autofill from connection dialog that opens, from the Project drop-down list, select the project that contains the connection.
From the Connection name drop-down list, select the connection that you want to use.
This list contains only object storage types which contain a bucket.
- Click Autofill.
Alternatively, manually fill out your object storage details:
- In the Endpoint field, enter the endpoint of your S3-compatible object storage bucket.
- In the Bucket field, enter the name of your S3-compatible object storage bucket.
- In the Region field, enter the region of your S3-compatible object storage account.
- In the Path field, enter a path to a model or folder. This path cannot point to a root folder.
To provide a URI, ensure that the URI radio button is selected.
In the URI field, enter the URI for the model.
ImportantDeployment of models that are registered by using a URI is currently supported for public OCI repositories only.
- Click Register model.
Verification
- The new model and version details are displayed on the Details tab for the model version.
- The new model and version are displayed on the Model registry page.
2.2. Registering a model version Copy linkLink copied to clipboard!
You can register a new model version.
Prerequisites
- You have logged in to Red Hat OpenShift AI.
- You have access to an available model registry in your deployment.
Procedure
- From the OpenShift AI dashboard, click AI hub → Registry.
- From the Model registry drop-down list, select the model registry that you want to register a model version in.
In the Model name column, click the name of the model that you want to register a new version of.
The details page for the model opens.
- Click the Versions tab, and then click Register new version.
In the Version details section, enter details to apply to this version of the model:
- In the Version name field, enter a name for the model version.
- Optional: In the Version description field, enter a description for this version of the model.
-
In the Source model format field, enter the name of the model format, for example,
ONNX. - In the Source model format version field, enter the version of the model format.
In the Model location section, specify the location of the model by providing either object storage details, or a URI.
To provide object storage details, ensure that the Object storage radio button is selected.
To autofill the details of an existing connection:
- Click Autofill from connection.
- In the Autofill from connection dialog that opens, from the Project drop-down list, select the project that contains the connection.
From the Connection name drop-down list, select the connection that you want to use.
This list contains only object storage types which contain a bucket.
- Click Autofill.
Alternatively, manually fill out your object storage details:
- In the Endpoint field, enter the endpoint of your S3-compatible object storage bucket.
- In the Bucket field, enter the name of your S3-compatible object storage bucket.
- In the Region field, enter the region of your S3-compatible object storage account.
- In the Path field, enter a path to a model or folder. This path cannot point to a root folder.
To provide a URI, ensure that the URI radio button is selected.
In the URI field, enter the URI for the model.
ImportantDeployment of models that are registered by using a URI is currently supported for public OCI repositories only.
- Click Register new version.
Verification
- The new model version is displayed in the Latest versions section on the Overview tab on the model details page.
- The new model version is displayed in the Latest version column on the Model registry page.
2.3. Viewing registered models Copy linkLink copied to clipboard!
You can view the details of models registered in OpenShift AI, such as registered versions, deployments, and metadata associated with the model.
Prerequisites
- You have logged in to Red Hat OpenShift AI.
- An available model registry exists in your deployment, and contains at least 1 registered model.
- You have access to the model registry that contains the model that you want to view.
Procedure
- From the OpenShift AI dashboard, click AI hub → Registry.
- From the Model registry drop-down list, select the model registry that contains the model that you want to view.
The Model registry page provides a high-level view of registered models, including the model name, latest version, deployments, labels, last modified timestamp, and owner of each model.
Models are sorted by their Last modified timestamp by default.
Use the search bar to find a model in the list. You can filter with a keyword by default by entering a model name, description, or label. Alternatively, click the search bar drop-down list and select Owner to filter by entering a model owner.
Searching by keyword performs a search across the name, description, and labels of registered models and their versions.
Click the name of a model to view the details page for the model:
- On the Overview tab, you can view model metadata such as labels, description, owner, model ID, last modified and created timestamps, and custom properties, along with latest versions and deployments.
- On the Versions tab, you can view the registered versions of the model.
- On the Deployments tab, you can view deployments initiated from the model registry for this model.
Verification
- You can view information about the selected model on the details page for the model.
2.4. Viewing registered model versions Copy linkLink copied to clipboard!
You can view the details of model versions that are registered in OpenShift AI, such as the version metadata and deployment information.
Prerequisites
- You have logged in to Red Hat OpenShift AI.
- An available model registry exists in your deployment, and contains at least 1 registered model.
- You have access to the model registry that contains the model version that you want to view.
Procedure
- From the OpenShift AI dashboard, click AI hub → Registry.
- From the Model registry drop-down list, select the model registry that contains the model version that you want to view.
- Click the name of a model to view Overview tab on the model details page, which includes the latest model versions and deployments.
On the Versions tab, you can view the registered versions of the model.
Versions are sorted by their Last modified timestamp by default.
Use the search bar to find a version in the list. You can filter with a keyword by default by entering a model name, description, or label. Alternatively, click the search bar drop-down list and select Author to filter by entering a model owner.
Searching by keyword performs a search across the name, description, and labels of registered models and their versions.
- Click the name of a version to view the version details page.
On the Details tab, you can view the Version details metadata, such as labels, description, custom properties, version ID, author, and last modified and registered timestamps. This also includes where the model is registered from, model location, and model format information.
You can also click Model details to view non-version metadata, such as labels, description, owner, model ID, last modified and created timestamps, and custom properties.
On the Deployments tab, you can view deployments initiated from the model registry for this version.
Click the name of a deployment to open its metrics page.
For information about model metrics, see Viewing performance metrics for a deployed model.
Verification
- You can view the details of registered model versions on the Model registry page.
2.5. Editing model metadata in a model registry Copy linkLink copied to clipboard!
You can edit the metadata of models registered in OpenShift AI, such as the model description, labels, and custom properties. Editing model metadata affects all versions of the model.
Prerequisites
- You have logged in to Red Hat OpenShift AI.
- An available model registry exists in your deployment, and contains at least 1 registered model.
- You have access to the model registry that contains the model that you want to edit.
Procedure
- From the OpenShift AI dashboard, click AI hub → Registry.
- From the Model registry drop-down list, select the model registry that contains the model that you want to edit.
- The Model registry page provides a high-level view of registered models, including the model name, latest version, deployments, labels, last modified timestamp, and owner of each model.
- Click the name of a model to view the model details page.
On the Overview tab, you can edit metadata for the model.
-
In the Labels section, click Edit to edit the labels of the model, for example,
text-to-text. - In the Description section, click Edit to edit the description of the model.
In the Properties section, click Add property to add a new property to the model, for example, Key:
license, Value:apache.TipIf you enter any property value as a URL, this is displayed as a clickable link in the Properties section, for example: https://www.apache.org/licenses/LICENSE-2.0.
- To edit an existing property, click the action menu (⋮) beside the property, and then click Edit.
- To delete a property, click the action menu (⋮) beside the property, and then click Delete.
-
In the Labels section, click Edit to edit the labels of the model, for example,
Verification
- You can view the updated metadata on the details page for the model.
2.6. Editing model version metadata in a model registry Copy linkLink copied to clipboard!
You can edit the metadata of model versions that are registered in OpenShift AI, such as the version’s description, labels, and custom properties. Editing model version metadata affects that model version only.
Prerequisites
- You have logged in to Red Hat OpenShift AI.
- An available model registry exists in your deployment, and contains at least 1 registered model.
- You have access to the model registry that contains the model version that you want to edit.
Procedure
- From the OpenShift AI dashboard, click AI hub → Registry.
- From the Model registry drop-down list, select the model registry that contains the model version that you want to edit.
- Click the name of a model to view the model details page.
- Click the Versions tab to view the available model versions.
- Click a version name to view the version details page.
In the Version details section, you can edit the version metadata.
-
In the Labels section, click Edit to edit the labels of the version, for example,
text-to-text. - In the Description section, click Edit to edit the description of the version.
In the Properties section, click Add property to add a new property to the version, for example, Key:
license, Value:apache.TipIf you enter any property value as a URL, this is displayed as a clickable link in the Properties section, for example: https://www.apache.org/licenses/LICENSE-2.0.
- To edit an existing property, click the action menu (⋮) beside the property, and then click Edit.
- To delete a property, click the action menu (⋮) beside the property, and then click Delete.
-
In the Model format section, click Edit to edit the format of the model version, for example,
ONNX. - In the Model format version section, click Edit to edit the format version of the model version.
-
In the Labels section, click Edit to edit the labels of the version, for example,
Verification
- You can view the updated metadata on the details page for the model version.
2.7. Deploying a model version from a model registry Copy linkLink copied to clipboard!
You can deploy a version of a registered model directly from a model registry.
Prerequisites
- An available model registry exists in your deployment, and contains at least one registered model.
- To deploy a model version by using the model serving platform, you have fulfilled the prerequisites described in Deploying models on the model serving platform.
Procedure
- From the OpenShift AI dashboard, click AI hub → Registry.
- From the Model registry list, select the model registry from which you want to deploy a model version.
In the Model name column, click the name of the model that contains the version that you want to deploy.
The details page for the model version opens.
- Click the action menu (⋮) beside the model version that you want to deploy.
- Click Deploy for the model version.
In the Deploy model dialog, configure properties for deploying the model:
From the Project list, select a target project.
When you select a project, OpenShift AI scans through the connections to that project and checks if any match the connections that the model was registered with.
If there is a single matching connection, this is autoselected. If there are multiple matching connections, these are displayed next in the Connection list.
If there are no matching connections, you can go straight to the deployment wizard, without selecting a connection, and the model location data will be autofilled as a new connection.
When there are multiple matching connections, from the Connection list, select the connection that you want to use when deploying the model.
The deployment wizard is autofilled with the details for your selected connection. If you selected a connection or one was autoselected, you can change the connection or create a new one in the next steps.
Click Deploy.
This displays the deployment wizard.
On the Model details page, provide information about the model:
From the Model location list, specify where your model is stored and complete the appropriate details for your connection. For a matching connection selected in the Deploy model dialog, the details are autofilled. Alternatively, you can create a new connection.
For more information about connections, see Adding a connection to your project.
Optional: In the Model deployment name field, enter a unique name for your model deployment. This field is autofilled with a value that contains the model name by default.
This will be the name of the inference service that is created when the model is deployed.
- Click Next.
- On the Model deployment and Advanced settings pages, configure the remaining properties for deploying your model, as described in Deploying models on the model serving platform.
- On the Review page, review the settings that you have selected before deploying the model.
- Click Deploy.
Verification
- The model deployment is displayed on the AI hub → Deployments page.
- The model deployment is displayed in the Latest deployments section of the model details page.
- The model version is displayed on the Deployments tab for the model.
- You can edit the model version deployment by clicking the action menu (⋮) beside it, and then clicking Edit.
- You can delete the model version deployment by clicking the action menu (⋮) beside it, and then clicking Delete.
2.8. Editing the deployment properties of a deployed model version from a model registry Copy linkLink copied to clipboard!
You can edit model version deployment properties from a model registry for models that were deployed from the registry. For example, you can change the deployment name, model framework, and source model location details.
2.8.1. Editing the deployment properties of a model deployed by using the model serving platform Copy linkLink copied to clipboard!
You can edit the deployment properties of a deployed model version from a model registry. For example, you can change the deployment name, model framework, number of model server replicas, model server size, and source model location details.
Prerequisites
- You have logged in to Red Hat OpenShift AI.
- An available model registry exists in your deployment, and contains at least 1 registered and deployed model version.
- You have access to the model registry that contains the model version deployment that you want to edit.
Procedure
- From the OpenShift AI dashboard, click AI hub → Registry.
- From the Model registry drop-down list, select the model registry that contains the model deployment that you want to edit.
In the Model name column, click the name of the model that contains the deployment that you want to edit.
The details page for the model opens.
- Click the name of the model version with the deployment that you want to edit.
- Click Deployments
- Click the action menu (⋮) beside the model deployment that you want to edit.
- Click Edit.
In the Edit model dialog, edit the model deployment properties:
- In the Model deployment name field, enter a new, unique name for your model deployment.
From the Model framework list, select a different framework for your model.
NoteThe Model framework list shows only the frameworks that are supported by the model serving runtime that you specified when you deployed your model.
- In the Number of model server replicas to deploy field, specify a value.
- From the Model server size list, select a value.
- In the Model route section, select the Make deployed models available through an external route checkbox to make your deployed models available to external clients.
In the Token authentication section, select the Require token authentication checkbox to require token authentication for your model server. To finish configuring token authentication, perform the following actions:
- In the Service account name field, enter a service account name for which the token will be generated. The generated token is created and displayed in the Token secret field when the model server is configured.
- To add an additional service account, click Add a service account and enter another service account name.
- Edit the connection by specifying an existing connection, or by creating a new connection.
Customize the runtime parameters in the Configuration parameters section:
- Modify the values in Additional serving runtime arguments to define how the deployed model behaves.
Modify the values in Additional environment variables to define variables in the model’s environment.
The Configuration parameters section shows predefined serving runtime parameters, if any are available.
NoteDo not modify the port or model serving runtime arguments, because they require specific values to be set. Overwriting these parameters can cause the deployment to fail.
- Click Redeploy.
Verification
- The model redeploys and is displayed with updated details on the Deployments tab for the model version.
2.9. Deleting a deployed model version from a model registry Copy linkLink copied to clipboard!
You can delete the deployments of model versions from a model registry.
Prerequisites
- You have logged in to Red Hat OpenShift AI.
- An available model registry exists in your deployment, and contains at least 1 registered model with a deployed model version.
- You have access to the model registry that contains the model version deployment that you want to delete.
Procedure
- From the OpenShift AI dashboard, click AI hub → Registry.
- From the Model registry drop-down list, select the model registry that contains the deployment that you want to delete.
Click the name of a model to view more details.
The details page for the model opens.
Click the name of the model version with the deployment that you want to delete.
The details page for the model version opens.
- Click Deployments.
To delete a deployment, click the action menu (⋮) beside the deployment, and then click Delete.
The Delete deployed model? dialog opens.
- Enter the name of the model deployment in the text field to confirm that you intend to delete it.
- Click Delete deployed model.
Verification
- The model deployment is no longer displayed on the Deployments tab for the model version.
2.10. Archiving a model Copy linkLink copied to clipboard!
You can archive a model that you no longer require. The model and all of its versions will be archived and unavailable for use unless it is restored.
Models with deployed versions cannot be archived. To archive a model, you must first delete all deployments of its registered versions from the AI hub → Deployments page.
Prerequisites
- You have logged in to Red Hat OpenShift AI.
- An available model registry exists in your deployment, and contains at least 1 registered model.
- You have access to the model registry that contains the model that you want to archive.
Procedure
- From the OpenShift AI dashboard, click AI hub → Registry.
- From the Model registry drop-down list, select the model registry that you want to archive a model in.
- Click the action menu (⋮) beside the model that you want to archive.
- Click Archive model.
- In the Archive model? dialog that is displayed, enter the name of the model in the text field to confirm that you intend to archive it.
- Click Archive.
Verification
- The model is no longer visible on the Model registry page.
- The model is displayed on the archived models page for the model registry.
2.11. Archiving a model version Copy linkLink copied to clipboard!
You can archive a model version that you no longer require. The model version will be archived and unavailable for use unless it is restored.
Deployed model versions cannot be archived. To archive a model version, you must first delete all deployments of the version from the AI hub → Deployments page.
Prerequisites
- You have logged in to Red Hat OpenShift AI.
- An available model registry exists in your deployment, and contains at least 1 registered model.
- You have access to the model registry that contains the model version that you want to archive.
Procedure
- From the OpenShift AI dashboard, click AI hub → Registry.
- From the Model registry drop-down list, select the model registry that you want to archive a model in.
In the Model name column, click the name of the model that contains the version that you want to archive.
The details page for the model version opens.
- Click the action menu (⋮) beside the version that you want to archive.
- Click Archive model version.
- In the Archive version? dialog that opens, enter the name of the model version in the text field to confirm that you intend to archive it.
- Click Archive.
Verification
- The model version is no longer visible on the details page for the model.
- The model version is displayed on the archived versions page for the model.
2.12. Restoring a model Copy linkLink copied to clipboard!
You can restore an archived model. The model and all of its versions will be restored and returned to the registered models list.
Prerequisites
- You have logged in to Red Hat OpenShift AI.
- An available model registry exists in your deployment, and contains at least one archived model.
- You have access to the model registry that contains the model that you want to restore.
Procedure
- From the OpenShift AI dashboard, click AI hub → Registry.
- From the Model registry drop-down list, select the model registry that you want to restore a model in.
Click the action menu (⋮) beside the Register model button, and then click View archived models.
The archived models page for the model registry opens.
- Click the action menu (⋮) beside the model that you want to restore.
- Click Restore model.
- In the Restore model? dialog that is displayed, click Restore.
Verification
- The model is displayed on the Model registry page.
- The model is no longer displayed on the archived models page for the model registry.
2.13. Restoring a model version Copy linkLink copied to clipboard!
You can restore an archived model version. The model version will be restored and returned to the versions list for the model.
Prerequisites
- You have logged in to Red Hat OpenShift AI.
- An available model registry exists in your deployment, and contains at least one archived model version.
- You have access to the model registry that contains the model version that you want to restore.
Procedure
- From the OpenShift AI dashboard, click AI hub → Registry.
- From the Model registry drop-down list, select the model registry that you want to restore a model version in.
In the Model name column, click the name of the model that contains the version that you want to restore.
The details page for the model version opens.
Click the action menu (⋮) beside the Register new version button, and then click View archived versions.
The archived versions page for the model opens.
- Click the action menu (⋮) beside the version that you want to restore.
- Click Restore version.
In the Restore version? dialog that opens, click Restore.
The details page for the version opens.
Verification
- The model version is displayed on the details page for the model.
- The model is no longer displayed on the archived versions page for the model.