Stay organized with collectionsSave and categorize content based on your preferences.
Model versioning lets you create multiple versions of the same model.
With model versioning, you can organize your models in a way that helps
navigate and understand which changes had what effect on the models.
With Model Registry
you can view your models and all of their versions in a single view.
You can drill down into specific model versions and see exactly how they
performed.
Import a new model version
From the Model Registry, you can import a model as a
new version of an existing model.
From the drop-down, select the model this is a new version of. Add an optional version description.
Optionally set this model as the default version. The default version is preselected
whenever the model is used for prediction (although you can still select other versions).
Select your Region.
SelectContinue.
From the Model settings, define what container you want to use. You can select to
import model artifacts into a new prebuilt container or import into an existing custom container.
To learn more about containers, seeImport models to Vertex AI.
SelectContinue.
Optional: Add explainability support to your model.
SelectImport.
REST
Before using any of the request data,
make the following replacements:
PROJECT_ID: The project ID.
LOCATION: The location.
MODEL_DISPLAY_NAME: The model name.
ARTIFACT_URI: The path to the directory containing the model artifact and any of its supporting files.
IMAGE_URI: Docker image to be used as the custom container for serving predictions.
PARENT_MODEL: The resource name of the model into which to upload the version.
HTTP method and URL:
POST https://LOCATION_ID-aiplatform.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION_ID/models:upload
You should receive a successful status code (2xx) and an empty response.
Python
Python
fromtypingimportListfromgoogle.cloudimportaiplatformdefupload_new_model_version_using_custom_training_pipeline(display_name:str,script_path:str,container_uri,model_serving_container_image_uri:str,dataset_id:str,replica_count:int,machine_type:str,accelerator_type:str,accelerator_count:int,parent_model:str,args:List[str],model_version_aliases:List[str],model_version_description:str,is_default_version:bool,project:str,location:str,):"""Uploads a new model version using a custom training pipeline.Args:display_name: The display name of the model version.script_path: The path to the Python script that trains the model.container_uri: The URI of the container to use for training.model_serving_container_image_uri: The URI of the serving container image to use.dataset_id: The ID of the dataset to use for training.replica_count: The number of replicas to use for training.machine_type: The machine type to use for training.accelerator_type: The accelerator type to use for training.accelerator_count: The number of accelerators to use for training.parent_model: The parent resource name of an existing model.args: A list of arguments to pass to the training script.model_version_aliases: The aliases of the model version to create.model_version_description: The description of the model version.is_default_version: Whether the model version is the default version.project: The project ID.location: The region name.Returns:The new version of the model."""# Initialize the client.aiplatform.init(project=project,location=location)# Create the training job.# This job will upload a new, non-default version of the my-training-job modeljob=aiplatform.CustomTrainingJob(display_name=display_name,script_path=script_path,container_uri=container_uri,model_serving_container_image_uri=model_serving_container_image_uri,)# Create dataset# This examples uses a TabularDataset, but you can use any dataset type.dataset=aiplatform.TabularDataset(dataset_id)ifdataset_idelseNone# Run the training job.model=job.run(dataset=dataset,args=args,replica_count=replica_count,machine_type=machine_type,accelerator_type=accelerator_type,accelerator_count=accelerator_count,parent_model=parent_model,model_version_aliases=model_version_aliases,model_version_description=model_version_description,is_default_version=is_default_version,)returnmodel
Train a new model version
From the Model Registry, you can train a new version of a
model.
Console
From the Model Registry, you can create a version of
an existing model. To learn more about how to add or create a model version in your training
pipeline, seeCustomJob and model upload
On the top of the page, selectCreate. Enter the training method details and select
the model training method.
ClickContinue.
Under Model details, select theTrain new versionoption. From the dropdown
select the model you are adding a new version to. Add a description of the
version. ClickContinue.
From theCompute and pricingsection, enter your budget and selectStart trainingwhen you're ready. When the model training completes, the new version
is visible from the Model Registry.
REST
Before using any of the request data,
make the following replacements:
TRAINING_PIPELINE_NAME: A display name for the trainingPipeline
TRAINING_TASK_INPUT: The training task's parameter(s).
PARENT_MODEL: The resource name of the model into which to upload the version.
HTTP method and URL:
POST https://LOCATION-aiplatform.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/trainingPipelines
You should receive a successful status code (2xx) and an empty response.
Python
Python
fromgoogle.cloudimportaiplatformdefcreate_default_model_sample(model_id:str,project:str,location:str):"""Initialize a Model resource to represent an existing model version with alias 'default'.Args:model_id: The ID of the model to initialize. Parent resource name of the model is also accepted.project: The project ID.location: The region name.Returns:Model resource."""# Initialize the client.aiplatform.init(project=project,location=location)# Initialize the Model resource with the ID 'model_id'. The parent_name of the Model resource can be also# 'projects/<your-project-id>/locations/<your-region>/models/<your-model-id>'default_model=aiplatform.Model(model_name=model_id)returndefault_model
How to view a list of all versions of a model
From a model version's details page, you can choose to deploy and test your
model, set up batch inference, and evaluate depending on the model type. You can
also view the dataset used to train the model version directly from the version
details page.
Console
From the Model Registry, you can view a list of all versions of a model. This
can help you gain at a glance insight and helps with model organization.
You should receive a successful status code (2xx) and an empty response.
Python
Python
fromgoogle.cloudimportaiplatformdeflist_model_versions_sample(model_id:str,project:str,location:str):"""List all model versions of a model.Args:model_id: The ID of the model to list. Parent resource name of the model is also accepted.project: The project ID.location: The region name.Returns:versions: List of model versions."""# Initialize the client.aiplatform.init(project=project,location=location)# Initialize the Model Registry resource with the ID 'model_id'.The parent_name of Model resource can be also# 'projects/<your-project-id>/locations/<your-region>/models/<your-model-id>'model_registry=aiplatform.models.ModelRegistry(model=model_id)# List all model versions of the model.versions=model_registry.list_versions()returnversions
How to view model version details
From the Model Registry you can see your models and all
of your model versions. When selecting a model from the
Model Registry, the detail page displays model details
and specific model version details. From the details screen, you can evaluate
and test your model version, run a batch inference, or deploy the model to an
endpoint for online inference.
Console
Use the following instructions to view your model details page. To view version details,
click the version name.
From the Vertex AI Model Registry, click a model name to open the model details page.
A list of all versions and their associated version IDs displays. You see model versions separated by
row. Model version details include the version ID, the model alias, status, description, and labels.
To view the details of one of the model versions, select a version ID. The model details page opens
From the details page you can evaluate, deploy and test, use batch prediction, and take a closer look at the version details.
Additionally, from this page you can useVertex AI Model Evaluationto compare your model versions.
Python
Python
fromgoogle.cloudimportaiplatformdefget_model_version_info_sample(model_id:str,version_id:str,project:str,location:str):"""Get model version info.Args:model_id: The ID of the model.version_id: The version ID of the model version.project: The project ID.location: The region name.Returns:VersionInfo resource."""# Initialize the client.aiplatform.init(project=project,location=location)# Initialize the Model Registry resource with the ID 'model_id'.The parent_name of Model resource can be also# 'projects/<your-project-id>/locations/<your-region>/models/<your-model-id>'model_registry=aiplatform.models.ModelRegistry(model=model_id)# Get model version info with the version 'version_id'.model_version_info=model_registry.get_version_info(version=version_id)returnmodel_version_info
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,[]]