Google Cloud Vertex AI Official Notebooks
The official notebooks are a collection of curated and non-curated notebooks authored by Google Cloud staff members. The curated notebooks are linked to in the Vertex AI online web documentation.
The official notebooks are organized by Google Cloud Vertex AI services.
Manifest of Curated Notebooks
AutoML
AutoML text classification model
In this tutorial, you learn how to use `AutoML` to train a text classification model.This tutorial uses the following Google Cloud ML services:
AutoML TrainingVertex AI Model resourceThe steps performed include:
- Create a
Vertex AI Dataset- Train an
AutoMLtext classificationModelresource.- Obtain the evaluation metrics for the
Modelresource.- Create an
Endpointresource.- Deploy the
Modelresource to theEndpointresource.- Make an online prediction.
- Make a batch prediction.
AutoML tabular forecasting model
In this tutorial, you create an `AutoML` tabular forecasting model from a Python script, and then do a batch prediction using the Vertex AI SDK.This tutorial uses the following Google Cloud ML services:
AutoML TrainingVertex AI Batch PredictionVertex AI ModelresourceThe steps performed include:
- Create a
Vertex AI Datasetresource.- Train an
AutoMLtabular forecastingModelresource.- Obtain the evaluation metrics for the
Modelresource.- Make a batch prediction.
Vertex AI Training
Custom image classification model training and batch prediction
In this tutorial, you learn to use `Vertex AI Training` to create a custom trained model and use `Vertex AI Batch Prediction` to do a batch prediction on the trained model.This tutorial uses the following Google Cloud ML services:
Vertex AI TrainingVertex AI Batch PredictionVertex AI ModelresourceThe steps performed include:
- Create a
Vertex AIcustom job for training a TensorFlow model.- Upload the trained model artifacts as a
Modelresource.- Make a batch prediction.
Custom image classification model training and online prediction
In this tutorial, you learn to use `Vertex AI Training` to create a custom-trained model from a Python script in a Docker container, and learn to use `Vertex AI Prediction` to do a prediction on the deployed model by sending data.This tutorial uses the following Google Cloud ML services:
Vertex AI TrainingVertex AI PredictionVertex AI ModelresourceVertex AI EndpointresourceThe steps performed include:
- Create a
Vertex AIcustom job for training a TensorFlow model.- Upload the trained model artifacts to a
Modelresource.- Create a serving
Endpointresource.- Deploy the Model resource to a serving
Endpointresource.- Make a prediction.
- Undeploy the
Modelresource.
Vertex Explainable AI
AutoML tabular binary classification model with batch explanations
In this tutorial, you learn to use `AutoML` to create a tabular binary classification model from a Python script, and then learn to use `Vertex AI Batch Prediction` to make predictions with explanations.This tutorial uses the following Google Cloud ML services:
Vertex AI AutoMLVertex AI Batch PredictionVertex Explainable AIVertex AI ModelresourceThe steps performed include:
- Create a
Vertex Datasetresource.- Train an
AutoMLtabular binary classification model.- View the model evaluation metrics for the trained model.
- Make a batch prediction request with explainability.
AutoML tabular binary classification model with online explanations
In this tutorial, you learn to use `AutoML` to create a tabular binary classification model from a Python script, and then learn to use `Vertex AI Online Prediction` to make online predictions with explanations.This tutorial uses the following Google Cloud ML services:
Vertex AI AutoMLVertex AI PredictionVertex Explainable AIVertex AI ModelresourceVertex AI EndpointresourceThe steps performed include:
- Create a
Vertex AI Datasetresource.- Train an
AutoMLtabular binary classification model.- View the model evaluation metrics for the trained model.
- Create a serving
Endpointresource.- Deploy the
Modelresource to a servingEndpointresource.- Make an online prediction request with explainability.
- Undeploy the
Modelresource.
Custom tabular regression model with batch explanations
In this tutorial, you learn to use `Vertex AI Training` and `Explainable AI` to create a custom image classification model with explanations, and then you learn to use `Vertex AI Batch Prediction` to make a batch prediction request with explanations.This tutorial uses the following Google Cloud ML services:
Vertex AI TrainingVertex AI Batch PredictionVertex Explainable AIVertex AI Model resourceThe steps performed include:
- Create a
Vertex AIcustom job for training a TensorFlow model.- View the model evaluation for the trained model.
- Set explanation parameters for when the model is deployed.
- Upload the trained model artifacts and explanations as a
Modelresource.- Make a batch prediction with explanations.
Custom tabular regression model with online explanations
In this tutorial, you learn to use `Vertex AI Training` and `Explainable AI` to create a custom image classification model with explanations, and then you learn to use `Vertex AI Prediction` to make an online prediction request with explanations.This tutorial uses the following Google Cloud ML services:
Vertex AI TrainingVertex AI PredictionVertex Explainable AIVertex AI ModelresourceVertex AI EndpointresourceThe steps performed include:
- Create a
Vertex AIcustom job for training a TensorFlow model.- View the model evaluation for the trained model.
- Set explanation parameters for when the model is deployed.
- Upload the trained model artifacts and explanations as a
Modelresource.- Create a serving
Endpointresource.- Deploy the
Modelresource to a servingEndpointresource.- Make a prediction with explanation.
- Undeploy the
Modelresource.
Custom image classification model with batch explanations
In this tutorial, you learn to use `Vertex AI Training and Explainable AI` to create a custom image classification model with explanations, and then you learn to use `Vertex AI Batch Prediction` to make a batch prediction request with explanations.This tutorial uses the following Google Cloud ML services:
Vertex AI TrainingVertex AI Batch PredictionVertex Explainable AIVertex AI ModelresourceThe steps performed include:
- Create a
Vertex AIcustom job for training a TensorFlow model.- View the model evaluation for the trained model.
- Set explanation parameters for when the model is deployed.
- Upload the trained model artifacts and explanation parameters as a
Modelresource.- Make a batch prediction with explanations.
Custom image classification model with online explanations
In this tutorial, you learn to use `Vertex AI Training and Explainable AI` to create a custom image classification model with explanations, and then you learn to use `Vertex AI Prediction` to make an online prediction request with explanations.This tutorial uses the following Google Cloud ML services:
Vertex AI TrainingVertex AI Online PredictionVertex Explainable AIVertex AI ModelresourceVertex AI EndpointresourceThe steps performed include:
- Create a
Vertex AIcustom job for training a TensorFlow model.- View the model evaluation for the trained model.
- Set explanation parameters for when the model is deployed.
- Upload the trained model artifacts and explanations as a
Modelresource.- Create a serving
Endpointresource.- Deploy the
Modelresource to a servingEndpointresource.- Make a prediction with explanation.
- Undeploy the
Modelresource.
Vertex Feature Store
Managing features in a feature store
In this notebook, you will learn how to use `Vertex AI Feature Store` to import feature data, and to access the feature data for both online serving and offline tasks, such as training.This tutorial uses the following Google Cloud ML services:
Vertex AI Feature StoreThe steps performed include:
- Create featurestore, entity type, and feature resources.
- Import feature data into
Vertex AI Feature Storeresource.- Serve online prediction requests using the imported features.
- Access imported features in offline jobs, such as training jobs.
Vertex Model Monitoring
Monitoring drift detection in online serving
In this notebook, you learn to use the `Vertex AI Model Monitoring` service to detect drift and anomalies in prediction requests from a deployed `Vertex AI Model` resource.This tutorial uses the following Google Cloud ML services:
Vertex AI Model MonitoringVertex AI PredictionVertex AI ModelresourceVertex AI EndpointresourceThe steps performed include:
- Upload a pre-trained model as a
Vertex AI Modelresource.- Create an
Vertex AI Endpointresource.- Deploy the
Modelresource to theEndpointresource.- Configure the
Endpointresource for model monitoring.- Generate synthetic prediction requests.
- Understand how to interpret the statistics, visualizations, other data reported by the model monitoring feature.
Vertex ML Metadata
Tracking hyperparameters and metrics in custom training job
In this notebook, you learn how to use `Vertex ML Metadata` to track training parameters and evaluation metrics.This tutorial uses the following Google Cloud ML services:
Vertex ML MetadataVertex AI ExperimentsThe steps performed include:
- Track parameters and metrics for a
Vertex AIcustom trained model.- Extract and perform analysis for all parameters and metrics within an Experiment.
Tracking hyperparameters and metrics in locally trained job
In this notebook, you learn how to use `Vertex ML Metadata` to track training parameters and evaluation metrics.This tutorial uses the following Google Cloud ML services:
Vertex ML MetadataVertex AI ExperimentsThe steps performed include:
- Track parameters and metrics for a locally trained model.
- Extract and perform analysis for all parameters and metrics within an Experiment.
Vertex AI Pipelines
Creating Python function KFP components
In this tutorial, you learn to use the KFP SDK to build lightweight Python function-based components, and then you learn to use `Vertex AI Pipelines` to execute the pipeline.This tutorial uses the following Google Cloud ML services:
Vertex AI PipelinesThe steps performed include:
- Build Python function-based KFP components.
- Construct a KFP pipeline.
- Pass Artifacts and parameters between components, both by path reference and by value.
- Use the kfp.dsl.importer method.
- Compile the KFP pipeline.
- Execute the KFP pipeline using
Vertex AI Pipelines
AutoML image classification model pipeline
In this tutorial, you learn to use `Vertex AI Pipelines` and `Google Cloud Pipeline Components` to build an `AutoML` image classification model.This tutorial uses the following Google Cloud ML services:
Vertex AI PipelinesGoogle Cloud Pipeline ComponentsVertex AutoMLVertex AI ModelresourceVertex AI EndpointresourceThe steps performed include:
- Create a KFP pipeline:
- Create a
Vertex AI Datasetresource.- Train an
AutoMLimage classificationModelresource.- Create an
Endpointresource.- Deploys the
Modelresource to theEndpointresource.- Compile the KFP pipeline.
- Execute the KFP pipeline using
Vertex AI Pipelines
AutoML tabular classification model pipeline
In this tutorial, you learn to use `Vertex AI Pipelines` and `Google Cloud Pipeline Components` to build an AutoML tabular classification model.This tutorial uses the following Google Cloud ML services:
Vertex AI PipelinesGoogle Cloud Pipeline ComponentsVertex AutoMLVertex AI ModelresourceVertex AI EndpointresourceThe steps performed include:
- Create a KFP pipeline:
- Create a
Datasetresource.- Train an
AutoMLtabular classificationModelresource.- Create an
Endpointresource.- Deploys the
Modelresource to theEndpointresource.- Compile the KFP pipeline.
- Execute the KFP pipeline using
Vertex AI Pipelines
AutoML tabular regression model pipeline
In this tutorial, you learn to use `Vertex AI Pipelines` and `Google Cloud Pipeline Components` to build an `AutoML` tabular regression model.This tutorial uses the following Google Cloud ML services:
Vertex AI PipelinesGoogle Cloud Pipeline ComponentsVertex AutoMLVertex AI ModelresourceVertex AI EndpointresourceThe steps performed include:
- Create a KFP pipeline:
- Create a
Datasetresource.- Train an
AutoMLtabular regressionModelresource.- Create an
Endpointresource.- Deploys the
Modelresource to theEndpointresource.- Compile the KFP pipeline.
- Execute the KFP pipeline using
Vertex AI Pipelines
AutoML text classification model pipeline
In this tutorial, you learn to use `Vertex AI Pipelines` and `Google Cloud Pipeline Components` to build an `AutoML` text classification model.This tutorial uses the following Google Cloud ML services:
Vertex AI PipelinesGoogle Cloud Pipeline ComponentsVertex AutoMLVertex AI Modelresource "-Vertex AI EndpointresourceThe steps performed include:
- Create a KFP pipeline:
- Create a
Datasetresource.- Train an AutoML text classification
Modelresource.- Create an
Endpointresource.- Deploys the
Modelresource to theEndpointresource.- Compile the KFP pipeline.
- Execute the KFP pipeline using
Vertex AI Pipelines
Custom training and batch prediction using prebuilt components pipeline
In this tutorial, you learn to use `Vertex AI Pipelines` and `Google Cloud Pipeline Components` to build a custom model.This tutorial uses the following Google Cloud ML services:
Vertex AI PipelinesGoogle Cloud Pipeline ComponentsVertex AI TrainingVertex AI ModelresourceVertex AI EndpointresourceThe steps performed include:
- Create a KFP pipeline:
- Train a custom model.
- Upload the trained model as a
Modelresource.- Create an
Endpointresource.- Deploy the
Modelresource to theEndpointresource.- Make a batch prediction request.
Custom training using prebuilt and custom components pipeline
In this tutorial, you learn to use `Vertex AI Pipelines` and `Google Cloud Pipeline Components` to build and deploy a custom model.This tutorial uses the following Google Cloud ML services:
Vertex AI PipelinesGoogle Cloud Pipeline ComponentsVertex AI TrainingVertex AI ModelresourceVertex AI EndpointresourceThe steps performed include:
- Create a KFP pipeline:
- Train a custom model.
- Uploads the trained model as a
Modelresource.- Creates an
Endpointresource.- Deploys the
Modelresource to theEndpointresource.- Compile the KFP pipeline.
- Execute the KFP pipeline using
Vertex AI Pipelines
Introduction to control flow in pipelines
In this tutorial, you use the KFP SDK to build pipelines that use loops and conditionals, including nested examples.This tutorial uses the following Google Cloud ML services:
Vertex AI PipelinesThe steps performed include:
- Create a KFP pipeline:
- Use control flow components
- Compile the KFP pipeline.
- Execute the KFP pipeline using
Vertex AI Pipelines
Introduction to KFP components and pipelines
In this tutorial, you use the KFP SDK to build pipelines.This tutorial uses the following Google Cloud ML services:
Vertex AI PipelinesThe steps performed include:
- Define and compile a
Vertex AIpipeline.- Schedule a recurring pipeline run.
- Specify which service account to use for a pipeline run.