Vertex AI Model Registry Overview
Your ML models‘ lifecycle may be managed centrally with the Vertex AI Model Registry. You can better organise, monitor, and train new versions of your models by using the Model Registry, which gives you an overview of them. When you want to deploy a model version, you can either use aliases to deploy models to an endpoint or assign it to an endpoint straight from the registry.
All AutoML data types text, tabular, picture, and video as well as bespoke models are supported by the Vertex AI Model Registry. BigQuery ML models can also be supported by the Model Registry. It is possible to register models that were trained in BigQuery ML without having to import them into the Model Registry or export them from BigQuery ML.
You may assess, deploy to an endpoint, configure batch prediction, and view particular model information from the model version details page. An easy-to-use interface for managing and deploying your top models to production is offered by the Vertex AI Model Registry.
Common workflow
There are numerous legitimate ways to work with the Model Registry. To begin, you may wish to read these instructions to learn what you can accomplish in the Model Registry and when to start model-training.
- To access the Model Registry, import models.
- Make new models, set a default alias for a model version, and get them ready for production.
- You may better manage and arrange your models and model versions by adding additional aliases or labels.
- For online prediction, deploy your models to an endpoint.
- Launch your pipeline for evaluating the model and run batch prediction.
- From the model details page, view your model details and performance metrics.
To access the vertex AI Model Registry, import models
Importing models into the Vertex AI Model Registry is explained in this guide. Your model appears in the Model Registry once you import it. You can execute predictions and deploy your imported model to an endpoint using the Model Registry.
Required roles
Request that your administrator assign you the Vertex AI User (roles/aiplatform.user) IAM role on the project so that you can import models. See Manage access to projects, files, and organisations for more details on assigning responsibilities.
Custom roles or other specified roles may also be able to grant you the necessary permissions.
Custom or prefabricated containers
A model is linked to a container when it is imported, allowing Vertex AI to execute prediction queries. Vertex AI offers prebuilt containers that you can use, or you can create your own unique containers and submit them to the Artefact Registry.
If your model satisfies the following criteria, you can utilise a prebuilt container:
- Equipped with Python 3.7 or higher
- trained with XGBoost, PyTorch, scikit-learn, or TensorFlow
- exported to satisfy the specifications of a prebuilt prediction container’s framework.
Vertex AI provides a unique custom container that you must use when importing a tabular AutoML model that you have previously exported.
If not, use an existing custom container that you have in the Artefact Registry or create a new one.
Upload model artifacts to Cloud Storage
Your model artefacts must be kept in a Cloud Storage bucket whose region corresponds to the regional endpoint you are using.
You must allow Vertex AI access to read your model artefacts if your Cloud Storage bucket is located in a different Google Cloud project.
Make sure the filenames of your model artefacts precisely match the following examples if you’re using a prebuilt container:
- Saved TensorFlowThe saved_model.pb model
- Model.mar in PyTorch
- Scikit-learn: either model.pkl or model.joblib
- Model.bst, model.joblib, or model.pkl are examples of XGBoost.
Use the Google Cloud console to import a model
- Navigate to the Vertex AI Models page in the Google Cloud console.
- Press the Import button.
- To bring in a new model, choose Import as new model.
- To import a model as a version of an existing model, choose Import as new version. See Model versioning for additional information.
- Name and area: Give your model a name. Choose a region that corresponds to the region of both your bucket and the Vertex AI regional endpoint you are utilising. Click “Continue.”
- Adding a customer-managed encryption key is a possible choice if you expand the Advanced options.
How to copy a model to a different region from the vertex AI Model Registry
It takes effort and experimentation to get your AutoML, huge models, and bespoke models in Vertex AI to the level you desire. Training a new model isn’t the ideal option if you have a model that works well that you want to apply in another project or place. Since model training is non-deterministic, it is improbable that you will obtain the same model from the same data. Furthermore, maintaining cross-region model behaviour consistency is not always possible by training a model in every project or location. A Vertex AI Model Registry copy model allows you to move a model from the Vertex AI Model Registry to a different project or to a different location within the same project.
The default model version is duplicated when you execute a model copy if you don’t specify which version you wish to copy over.
Limitations
Not all of the model’s data is transferred when a model is replicated. The following will not be retained by the copied model:
- version aliases.
- the unique model ID. After the model has been duplicated, you can specify a new ID.
- any assessment of an existing model.
- specifications for encryption. When copying the model for your target region, you must include the encryption key.
- Batch forecasts and deployments.
Custom models that feature a third-party container image cannot be copied across projects.
Models are copied between projects
Requirements
The owner of the source model must first give the destination project authorisation to export the model in order to duplicate it across projects:
- From the Google Cloud console, choose your project.
- Go to the page for IAM & Admin.
- Clicking Grant access on the IAM permissions page opens a pop-up window that allows you to add a new principal to the source project.
- Obtain the destination project’s per-product, per-project service account (P4SA) at service-{project_number}@gcp-sa-aiplatform.iam.gserviceaccount.com.
- Assign the Vertex AI Service Agent role to the source project and add the destination project’s P4SA as a new principal.
- The destination project P4SA will be able to export models from the source project once you click Save.