Chapter 2. Working with model registries 2.1. Registering a model As a data scientist, you can register a model from the OpenShift AI dashboard. Prerequisites You have logged in to Red Hat OpenShift AI. If you are using OpenShift AI groups, you are part of the user group or admin group (for example, rhoai-users or rhoai-admins ) in OpenShift. You have access to an available model registry in your deployment. Procedure From the OpenShift AI dashboard, click Model Registry . From the Model registry drop-down menu, 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 data science 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. Important Deployment of models that are registered by using a URI is not currently supported for this feature. Click Register model . Verification The new model appears on the Model Registry page. 2.2. Registering a model version You can register a model version. Prerequisites You have logged in to Red Hat OpenShift AI. If you are using OpenShift AI groups, you are part of the user group or admin group (for example, rhoai-users or rhoai-admins ) in OpenShift. You have access to an available model registry in your deployment. Procedure From the OpenShift AI dashboard, click Model Registry . From the Model registry drop-down menu, select the model registry that you want to register a model 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 Register new version . 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 data science 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. Important Deployment of models that are registered by using a URI is not currently supported for this feature. Click Register new version . Verification The new model version appears on the details page for the model. 2.3. Viewing registered models 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. If you are using OpenShift AI groups, you are part of the user group or admin group (for example, rhoai-users or rhoai-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 From the OpenShift AI dashboard, click Model Registry . From the Model registry drop-down menu, 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, 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 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. Click the name of a model to view more details. The details page for the model opens. On the Versions tab, you can view registered versions of the model. 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. 2.4. Viewing registered model versions 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. If you are using OpenShift AI groups, you are part of the user group or admin group (for example, rhoai-users or rhoai-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 From the OpenShift AI dashboard, click Model Registry . From the Model registry drop-down menu, select the model registry that contains the model version that you want to view. Click the name of a model to view its versions. The details page for the model opens. On the Versions tab, you can view 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 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. Click the name of a version to view more details. The details page for the version opens. 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. 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 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. 2.5. Editing model metadata in a model registry You can edit the metadata of models registered in OpenShift AI, such as the models's description, labels, and custom properties. Prerequisites You have logged in to Red Hat OpenShift AI. If you are using OpenShift AI groups, you are part of the user group or admin group (for example, rhoai-users or rhoai-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 From the OpenShift AI dashboard, click Model Registry . From the Model registry drop-down menu, 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, labels, last modified timestamp, and owner of each model. Click the name of a model to view more details. The details page for the model opens. On the Details tab, you can edit metadata for the model. In the Description section, click Edit to edit the description of the model. In the Labels section, click Edit to edit the labels of the model. In the Properties section, click Add property to add a new property to the model. 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 . Verification You can view the updated metadata on the details page for the model. 2.6. Editing model version metadata in a model registry You can edit the metadata of model versions that are registered in OpenShift AI, such as the version's description, labels, and custom properties. Prerequisites You have logged in to Red Hat OpenShift AI. If you are using OpenShift AI groups, you are part of the user group or admin group (for example, rhoai-users or rhoai-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 From the OpenShift AI dashboard, click Model Registry . From the Model registry drop-down menu, select the model registry that contains the model version that you want to edit. Click the name of a model to view more details. The details page for the model opens. Click the name of a version to view more details. The details page for the version opens. On the Details tab, you can edit the version metadata. In the Description section, click Edit to edit the description of the version. In the Labels section, click Edit to edit the labels of the version. In the Properties section, click Add property to add a new property to the version. 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 . 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 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 1 registered model. To deploy a model version by using the single-model serving platform, you have fulfilled the prerequisites described in Deploying a model by using the single-model serving platform . To deploy a model version by using the multi-model serving platform, you have fulfilled the prerequisites described in Deploying a model by using the multi-model serving platform . Procedure From the OpenShift AI dashboard, click Model Registry . From the Model registry drop-down menu, 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 . In the Deploy model dialog, configure properties for deploying the model. From the Project drop-down list, select a target project. Click Deploy . Configure the following properties for deploying your model: From the Project drop-down list, select a project in which to deploy your model. 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. 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 . Click Deploy . Verification The model version appears on the Deployments tab for the model version. 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 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 multi-model serving platform 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, and source model location details. Prerequisites You have logged in to Red Hat OpenShift AI. If you are using OpenShift AI groups, you are part of the user group or admin group (for example, rhoai-users or rhoai-admins ) in OpenShift. 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 Model Registry . From the Model registry drop-down menu, 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. Note The Model framework list shows only the frameworks that are supported by the model serving runtime that you specified when you configured your model server. Edit the connection by specifying an existing connection, or by creating a new connection. Click Redeploy . Verification The model redeploys and appears with updated details on the Deployments tab for the model version. 2.8.2. Editing the deployment properties of a model deployed by using the single-model serving platform 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. If you are using OpenShift AI groups, you are part of the user group or admin group (for example, rhoai-users or rhoai-admins ) in OpenShift. 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 Model Registry . From the Model registry drop-down menu, 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. Note The 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. Note Do 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 appears with updated details on the Deployments tab for the model version. 2.9. Deleting a deployed model version from a model registry You can delete the deployments of model versions from a model registry. Prerequisites You have logged in to Red Hat OpenShift AI. If you are using OpenShift AI groups, you are part of the user group or admin group (for example, rhoai-users or rhoai-admins ) in OpenShift. 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 Model Registry . From the Model registry drop-down menu, select the model registry that contains the model that you want to edit. 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 no longer appears on the Deployments tab for the model version. 2.10. 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 Serving Deployed models page. Prerequisites You have logged in to Red Hat OpenShift AI. If you are using OpenShift AI groups, you are part of the user group or admin group (for example, rhoai-users or rhoai-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 From the OpenShift AI dashboard, click Model Registry . From the Model registry drop-down menu, 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 appears, enter the name of the model in the text field to confirm that you intend to archive it. 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. 2.11. 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 Serving Deployed models page. Prerequisites You have logged in to Red Hat OpenShift AI. If you are using OpenShift AI groups, you are part of the user group or admin group (for example, rhoai-users or rhoai-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 From the OpenShift AI dashboard, click Model Registry . From the Model registry drop-down menu, 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 appears, 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 no longer appears on the details page for the model. The model version now appears on the archived versions page for the model. 2.12. 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 Red Hat OpenShift AI. If you are using OpenShift AI groups, you are part of the user group or admin group (for example, rhoai-users or rhoai-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 From the OpenShift AI dashboard, click Model Registry . From the Model registry dropdown menu, select the model registry that you want to restore a model in. 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. Click the action menu ( ... ) beside the model that you want to restore. Click Restore model . 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. 2.13. 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 Red Hat OpenShift AI. If you are using OpenShift AI groups, you are part of the user group or admin group (for example, rhoai-users or rhoai-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 From the OpenShift AI dashboard, click Model Registry . From the Model registry drop-down menu, select the model registry that you want to restore a model 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 drop-down menu, 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 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.

Commands: