Open Data Hub logo

Info alert:Important Notice

Please note that more information about the previous v2 releases can be found here. You can use "Find a release" search bar to search for a particular release.

Overview of model registries

Overview of model registries

A model registry is an important component in the lifecycle of an artificial intelligence/machine learning (AI/ML) model, and a vital part of any machine learning operations (MLOps) platform or ML workflow. A model registry acts as a central repository, holding metadata related to machine learning models from inception to deployment. This metadata ranges from high-level information like the deployment environment and project origins, to intricate 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 of the ML lifecycle.

Model registries provide a structured and organized way to store, share, version, deploy, and track models.

Configuring the model registry component

As an OpenShift cluster administrator, you can configure the model registry feature for Open Data Hub administrators and data scientists to use.

Configuring the model registry component

To configure the model registry feature for your data scientists to use in Open Data Hub, you must install the following Operators in OpenShift, and then enable the modelregistry component in Open Data Hub.

  • Red Hat Authorino Operator (Technical Preview)

  • Red Hat OpenShift Serverless Operator

  • Red Hat OpenShift Service Mesh Operator

  • Open Data Hub Operator version 2

Important

You must install the required Operators in the listed order. You should install the Open Data Hub Operator only after the other listed Operators are installed and in a running state.

For more information about installing Operators in OpenShift, see Adding Operators to a cluster.

For information about installing the Open Data Hub Operator, see Installing Open Data Hub Operator version 2.

After you install the Operators, you can use the following steps to enable the modelregistry component.

Prerequisites
  • You have cluster administrator privileges for your OpenShift Container Platform cluster.

  • You have access to the data science cluster.

  • You have installed Open Data Hub.

  • You have installed the Red Hat Authorino, Red Hat OpenShift Serverless, Red Hat OpenShift Service Mesh, and Open Data Hub Operators.

  • You have sufficient resources. For more information about the minimum resources required to use Open Data Hub, see Installing the Open Data Hub Operator version 2.

Procedure
  1. In the OpenShift Container Platform console, click OperatorsInstalled Operators.

  2. Search for the Open Data Hub Operator, and then click the Operator name to open the Operator details page.

  3. Click the Data Science Cluster tab.

  4. Click the default instance name (for example, default-dsc) to open the instance details page.

  5. Click the YAML tab to show the instance specifications.

  6. Find the spec.components section, and then add or update it to include the following modelregistry component entry, with the managementState field set to Managed, and the registriesNamespace field set to odh-model-registries:

     modelregistry:
        managementState: Managed
        registriesNamespace: odh-model-registries
  7. Click Save.

Verification
  • Confirm that the model registry namespace was created successfully:

    1. In the OpenShift console, click HomeProjects.

    2. Confirm that the odh-model-registries namespace appears in the Projects drop-down list.

  • Check the status of the model-registry-operator-controller-manager pod:

    1. In the OpenShift Container Platform console, from the Project list, select opendatahub.

    2. Click WorkloadsDeployments.

    3. Search for the model-registry-operator-controller-manager deployment.

    4. Check the status:

      1. Click the deployment name to open the deployment details page.

      2. Click the Pods tab.

      3. View the pod status.

        When the status of the model-registry-operator-controller-manager-<pod-id> pod is Running, the pod is ready to use.

Managing model registries

As an Open Data Hub administrator, you can create, delete, and manage permissions for model registries in Open Data Hub.

Creating a model registry

You can create a model registry to store, share, version, deploy, and track your models.

Prerequisites
  • You have logged in to Open Data Hub as a user with Open Data Hub administrator privileges.

  • A cluster administrator has configured and enabled the model registry component in your Open Data Hub deployment. For more information, see Configuring the model registry component.

  • The model registry component is enabled for your Open Data Hub deployment.

  • You have access to an external MySQL database which uses at least MySQL version 5.x. However, Red Hat recommends that you use MySQL version 8.x.

Procedure
  1. From the Open Data Hub dashboard, click SettingsModel registry settings.

  2. Click Create model registry.

    The Create model registry page opens.

  3. In the Name field, enter a name for the model registry.

  4. Optional: In the Resource Name field, enter a specific resource name for the model registry. By default, the resource name will match the name of the model registry.

    Important

    Resource names are what your resources are labeled as in OpenShift. Your resource name must consist of lowercase alphanumeric characters or -, and must start and end with an alphanumeric character. Resource names are not editable after creation.

    The resource name must not match the name of any other model registry resource in your OpenShift cluster.

  5. Optional: In the Description field, enter a description for the model registry.

  6. In the Connect to external MySQL database section, enter the information for the external database where your model data is stored.

    1. In the Host field, enter the database’s host name.

      1. If the database is running in running in the odh-model-registries namespace, enter only the hostname for the database.

      2. If the database is running in a different namespace from odh-model-registries, enter the database hostname details in <host name>.<namespace>.svc.cluster.local format.

    2. In the Port field, enter the port number for the database.

    3. In the Username field, enter the default user name that is connected to the database.

    4. In the Password field, enter the password for the default user account.

    5. In the Database field, enter the database name.

  7. Click Create.

Note

To find the resource name or type of a model registry, click the help icon Help icon beside the registry name. Resource names and types are used to find your resources in OpenShift.

Verification
  • The new model registry appears on the Model Registry Settings page.

  • You can view the database configuration for the model registry by clicking the action menu () beside it, and then clicking View database configuration.

  • You can register a model with the model registry from the Model Registry tab. For more information about working with model registries, see Working with model registries.

Managing model registry permissions

You can manage access to a model registry for individual users and user groups in your organization, and for service accounts in a project.

Open Data Hub creates the <model-registry-name>-users group automatically for use with model registries. You can add users to this group in OpenShift, or ask the cluster admin to do so.

Prerequisites
  • You have logged in to Open Data Hub as a user with Open Data Hub administrator privileges.

  • An available model registry exists in your deployment.

  • The users and groups that you want to provide access to already exist in OpenShift Container Platform. For more information, see Managing users and groups.

Procedure
  1. From the Open Data Hub dashboard, click SettingsModel registry settings.

  2. Click Manage permissions beside the model registry that you want to manage access for.

    The permissions page for the model registry opens.

  3. Provide one or more OpenShift groups with access to the project.

    1. On the Users tab, in the Groups section, click Add group.

    2. From the Select a group drop-down list, select a group.

      Note

      To enable access for all cluster users, add system:authenticated to the group list.

    3. To confirm your entry, click Confirm (The Confirm icon).

    4. Optional: To add an additional group, click Add group and repeat the process.

  4. Provide one or more users with access to the model registry.

    1. On the Users tab, in the Users section, click Add user.

    2. In the Type username field, enter the username of the user to whom you want to provide access.

    3. To confirm your entry, click Confirm (The Confirm icon).

    4. Optional: To add an additional user, click Add user and repeat the process.

  5. Provide all service accounts in a project with access to the model registry.

    1. On the Projects tab, in the Projects section, click Add project.

    2. In the Select or enter a project field, select or enter the name of the project to which you want to provide access.

    3. To confirm your entry, click Confirm (The Confirm icon).

    4. Optional: To add an additional project, click Add project and repeat the process.

Verification
  • Users, groups, and accounts that were granted access to a model registry can register, view, edit, version, deploy, delete, archive, and restore models in that registry.

  • The Users and Groups sections on the Permissions tab show the respective users and groups that you granted access to the model registry.

  • The Projects sections on the Projects tab show the projects that you granted access to the model registry.

Deleting a model registry

You can delete model registries that you no longer require.

Important

When you delete a model registry, databases connected to the model registry will not be removed. To remove any remaining databases, contact your cluster administrator.

Prerequisites
  • You have logged in to Open Data Hub as a user with Open Data Hub administrator privileges.

  • An available model registry exists in your deployment.

Procedure
  1. From the Open Data Hub dashboard, click SettingsModel registry settings.

  2. Click the action menu () beside the model registry that you want to delete.

  3. Click Delete model registry.

  4. In the Delete model registry? dialog that appears, enter the name of the model registry in the text field to confirm that you intend to delete it.

  5. Click Delete model registry.

Verification
  • The model registry no longer appears on the Model Registry Settings page.

Working with model registries

As a data scientist in Open Data Hub, you can store, share, version, deploy, and track models using the model registry feature.

Working with model registries

Registering a model

As a data scientist, you can register a model from the Open Data Hub dashboard.

Prerequisites
  • You have logged in to Open Data Hub.

  • If you are using Open Data Hub groups, you are part of the user group or admin group (for example, odh-users or odh-admins) in OpenShift.

  • You have access to an available model registry in your deployment.

Procedure
  1. From the Open Data Hub dashboard, click Model Registry.

  2. From the Model registry drop-down menu, select the model registry that you want to register a model in.

  3. Click Register model.

    The Register model page opens.

  4. In the Model details section, configure details to apply to all versions of the model:

    1. In the Model name field, enter a name for the model.

    2. Optional: In the Model description field, enter a description for the model.

  5. In the Version details section, enter details to apply to the first version of the model:

    1. In the Version name field, enter a name for the model version.

    2. Optional: In the Version description field, enter a description for the first version of the model.

    3. In the Source model format field, enter the name of the model format, for example, onnx.

    4. In the Source model format version field, enter the version of the model format.

  6. In the Model location section, specify the location of the model by providing either object storage details, or a URI.

    1. To provide object storage details, ensure that the Object storage radio button is selected.

      1. To autofill the details of an existing connection:

        1. Click Autofill from connection.

        2. In the Autofill from connection dialog that opens, from the Project drop-down list, select the data science project that contains the connection.

        3. 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.

        4. Click Autofill.

      2. Alternatively, manually fill out your object storage details:

        1. In the Endpoint field, enter the endpoint of your S3-compatible object storage bucket.

        2. In the Bucket field, enter the name of your S3-compatible object storage bucket.

        3. In the Region field, enter the region of your S3-compatible object storage account.

        4. In the Path field, enter a path to a model or folder. This path cannot point to a root folder.

    2. To provide a URI, ensure that the URI radio button is selected.

      1. In the URI field, enter the URI for the model.

        Important

        Deployment of models that are registered by using a URI is not currently supported for this feature.

  7. Click Register model.

Verification
  • The new model appears on the Model Registry page.

Registering a model version

You can register a model version.

Prerequisites
  • You have logged in to Open Data Hub.

  • If you are using Open Data Hub groups, you are part of the user group or admin group (for example, odh-users or odh-admins) in OpenShift.

  • You have access to an available model registry in your deployment.

Procedure
  1. From the Open Data Hub dashboard, click Model Registry.

  2. From the Model registry drop-down menu, select the model registry that you want to register a model in.

  3. 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.

  4. Click Register new version.

  5. In the Version details section, enter details to apply to the first version of the model:

    1. In the Version name field, enter a name for the model version.

    2. Optional: In the Version description field, enter a description for the first version of the model.

    3. In the Source model format field, enter the name of the model format, for example, onnx.

    4. In the Source model format version field, enter the version of the model format.

  6. In the Model location section, specify the location of the model by providing either object storage details, or a URI.

    1. To provide object storage details, ensure that the Object storage radio button is selected.

      1. To autofill the details of an existing connection:

        1. Click Autofill from connection.

        2. In the Autofill from connection dialog that opens, from the Project drop-down list, select the data science project that contains the connection.

        3. 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.

        4. Click Autofill.

      2. Alternatively, manually fill out your object storage details:

        1. In the Endpoint field, enter the endpoint of your S3-compatible object storage bucket.

        2. In the Bucket field, enter the name of your S3-compatible object storage bucket.

        3. In the Region field, enter the region of your S3-compatible object storage account.

        4. In the Path field, enter a path to a model or folder. This path cannot point to a root folder.

    2. To provide a URI, ensure that the URI radio button is selected.

      1. In the URI field, enter the URI for the model.

        Important

        Deployment of models that are registered by using a URI is not currently supported for this feature.

  7. Click Register new version.

Verification
  • The new model version appears on the details page for the model.

Viewing registered models

You can view the details of models registered in Open Data Hub, such as registered versions, deployments, and metadata associated with the model.

Prerequisites
  • You have logged in to Open Data Hub.

  • If you are using Open Data Hub groups, you are part of the user group or admin group (for example, odh-users or odh-admins) in OpenShift.

  • 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
  1. From the Open Data Hub dashboard, click Model Registry.

  2. From the Model registry drop-down menu, select the model registry that contains the model that you want to view.

  3. The Model Registry page provides a high-level view of registered models, including the model name, labels, last modified timestamp, and owner of each model.

  4. Use the search bar to find a model in the list. You can search with a keyword by default, or click the search bar drop-down menu and select Owner to search by model owner.

    Searching by keyword will perform a search across the name, description, and labels of registered models and their versions.

  5. Click the name of a model to view more details.

    The details page for the model opens.

    1. On the Versions tab, you can view registered versions of the model.

    2. On the Details tab, you can view the description, labels, custom properties, model ID, owner, and last modification and creation timestamps for the model.

Verification
  • You can view information about the selected model on the details page for the model.

Viewing registered model versions

You can view the details of model versions that are registered in Open Data Hub, such as the version metadata and deployment information.

Prerequisites
  • You have logged in to Open Data Hub.

  • If you are using Open Data Hub groups, you are part of the user group or admin group (for example, odh-users or odh-admins) in OpenShift.

  • 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
  1. From the Open Data Hub dashboard, click Model Registry.

  2. From the Model registry drop-down menu, select the model registry that contains the model version that you want to view.

  3. Click the name of a model to view its versions.

    The details page for the model opens.

  4. On the Versions tab, you can view registered versions of the model.

  5. Use the search bar to find a version in the list. You can search with a keyword by default, or click the search bar drop-down menu and select Author to search by model author.

    Searching by keyword will perform a search across the name, description, and labels of registered models and their versions.

  6. Click the name of a version to view more details.

    The details page for the version opens.

  7. On the Details tab, you can view the description, labels, custom properties, version ID, author, and last modification and registration timestamps for the model. You can also view the source model format and location information for the model.

  8. On the Deployments tab, you can view deployments initiated from the model registry for this version.

    1. Click the name of a deployment to open its metrics page.

      For information about model metrics on the single-model serving platform, see Serving large models: Monitoring model performance. For information about model metrics on the multi-model serving platform, see Serving small and medium sized models: Monitoring model performance.

Verification
  • You can view the details of registered model versions on the Model Registry page.

Editing model metadata in a model registry

You can edit the metadata of models registered in Open Data Hub, such as the models’s description, labels, and custom properties.

Prerequisites
  • You have logged in to Open Data Hub.

  • If you are using Open Data Hub groups, you are part of the user group or admin group (for example, odh-users or odh-admins) in OpenShift.

  • 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
  1. From the Open Data Hub dashboard, click Model Registry.

  2. From the Model registry drop-down menu, select the model registry that contains the model that you want to edit.

  3. The Model Registry page provides a high-level view of registered models, including the model name, labels, last modified timestamp, and owner of each model.

  4. Click the name of a model to view more details.

    The details page for the model opens.

  5. On the Details tab, you can edit metadata for the model.

    1. In the Description section, click Edit to edit the description of the model.

    2. In the Labels section, click Edit to edit the labels of the model.

    3. In the Properties section, click Add property to add a new property to the model.

      1. To edit an existing property, click the action menu () beside the property, and then click Edit.

      2. To delete a property, click the action menu () beside the property, and then click Delete.

Verification
  • You can view the updated metadata on the details page for the model.

Editing model version metadata in a model registry

You can edit the metadata of model versions that are registered in Open Data Hub, such as the version’s description, labels, and custom properties.

Prerequisites
  • You have logged in to Open Data Hub.

  • If you are using Open Data Hub groups, you are part of the user group or admin group (for example, odh-users or odh-admins) in OpenShift.

  • 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
  1. From the Open Data Hub dashboard, click Model Registry.

  2. From the Model registry drop-down menu, select the model registry that contains the model version that you want to edit.

  3. Click the name of a model to view more details.

    The details page for the model opens.

  4. Click the name of a version to view more details.

    The details page for the version opens.

  5. On the Details tab, you can edit the version metadata.

    1. In the Description section, click Edit to edit the description of the version.

    2. In the Labels section, click Edit to edit the labels of the version.

    3. In the Properties section, click Add property to add a new property to the version.

      1. To edit an existing property, click the action menu () beside the property, and then click Edit.

      2. To delete a property, click the action menu () beside the property, and then click Delete.

Verification
  • You can view the updated metadata on the details page for the model version.

Deploying a model version from a model registry

You can deploy a version of a registered model directly from a model registry.

Prerequisites
Procedure
  1. From the Open Data Hub dashboard, click Model Registry.

  2. From the Model registry drop-down menu, select the model registry from which you want to deploy a model version.

  3. 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.

  4. Click the action menu () beside the model version that you want to deploy.

  5. Click Deploy.

  6. In the Deploy model dialog, configure properties for deploying the model.

    1. From the Project drop-down list, select a target project.

    2. Click Deploy.

  7. Configure the following properties for deploying your model:

    1. From the Project drop-down list, select a project in which to deploy your model.

    2. Optional: In the Model deployment name field, enter a name for the model deployment.

      Each deployment is named in the following format by default:

      <model name> <model version name> <deployment creation timestamp>

      This will be the name of the inference service that is created when the model is deployed.

  8. Configure the remaining properties for deploying your model, as described in Deploying a model by using the multi-model serving platform or Deploying a model by using the single-model serving platform.

    1. Click Deploy.

Verification
  • The model version appears on the Deployments tab for the model version.

Archiving a model

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.

Important

Models with deployed versions cannot be archived. To archive a model, you must first delete all deployments of its registered versions from the Model ServingDeployed models page.

Prerequisites
  • You have logged in to Open Data Hub.

  • If you are using Open Data Hub groups, you are part of the user group or admin group (for example, odh-users or odh-admins) in OpenShift.

  • 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
  1. From the Open Data Hub dashboard, click Model Registry.

  2. From the Model registry drop-down menu, select the model registry that you want to archive a model in.

  3. Click the action menu () beside the model that you want to archive.

  4. Click Archive model.

  5. In the Archive model? dialog that appears, enter the name of the model in the text field to confirm that you intend to archive it.

  6. Click Archive.

Verification
  • The model no longer appears on the Model Registry page.

  • The model now appears on the archived models page for the model registry.

Archiving a model version

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.

Important

Deployed model versions cannot be archived. To archive a model version, you must first delete all deployments of the version from the Model ServingDeployed models page.

Prerequisites
  • You have logged in to Open Data Hub.

  • If you are using Open Data Hub groups, you are part of the user group or admin group (for example, odh-users or odh-admins) in OpenShift.

  • 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
  1. From the Open Data Hub dashboard, click Model Registry.

  2. From the Model registry drop-down menu, select the model registry that you want to archive a model in.

  3. 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.

  4. Click the action menu () beside the version that you want to archive.

  5. Click Archive model version.

  6. In the Archive version? dialog that appears, enter the name of the model version in the text field to confirm that you intend to archive it.

  7. Click Archive.

Verification
  • The model version no longer appears on the details page for the model.

  • The model version now appears on the archived versions page for the model.

Restoring a model

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 Open Data Hub.

  • If you are using Open Data Hub groups, you are part of the user group or admin group (for example, odh-users or odh-admins) in OpenShift.

  • 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
  1. From the Open Data Hub dashboard, click Model Registry.

  2. From the Model registry dropdown menu, select the model registry that you want to restore a model in.

  3. Click the action menu () beside the Register model drop-down menu, and then click View archived models.

    The archived models page for the model registry opens.

  4. Click the action menu () beside the model that you want to restore.

  5. Click Restore model.

  6. In the Restore model? dialog that appears, click Restore.

Verification
  • The model appears on the Model Registry page.

  • The model no longer appears on the archived models page for the model registry.

Restoring a model version

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 Open Data Hub.

  • If you are using Open Data Hub groups, you are part of the user group or admin group (for example, odh-users or odh-admins) in OpenShift.

  • 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
  1. From the Open Data Hub dashboard, click Model Registry.

  2. From the Model registry drop-down menu, select the model registry that you want to restore a model in.

  3. 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.

  4. Click the action menu () beside the Register new version drop-down menu, and then click View archived versions.

    The archived versions page for the model opens.

  5. Click the action menu () beside the version that you want to restore.

  6. Click Restore version.

  7. In the Restore version? dialog that appears, click Restore.

    The details page for the version opens.

Verification
  • The model version appears on the details page for the model.

  • The model no longer appears on the archived versions page for the model.