Vertex AI Jupyter Notebook tutorials

This document contains a list of all the Vertex AI Jupyter Notebook tutorials. They're end-to-end tutorials that show you how to preprocess data, train, deploy, and use the models for inference.

There are many environments in which you can host Jupyter Notebooks. You can:

  • Download them from GitHub and run them on your local machine
  • Download them from GitHub and run them on a Jupyter or JupyterLab server in your local network
  • Run them in the cloud using a service like Colaboratory (Colab) or Vertex AI Workbench.

Colab

Running a Jupyter Notebook in Colab is an easy way to get started quickly.

To open a notebook tutorial in Colab, click the Colab link in the notebook list. Colab creates a VM instance with all needed dependencies, launches the Colab environment, and loads the notebook.

Vertex AI Workbench

You can also run the notebook using user-managed notebooks. When you create a user-managed notebooks instance with Vertex AI Workbench, you have full control over the hosting VM. You can specify the configuration and environment of the hosting VM.

To open a notebook tutorial in a Vertex AI Workbench instance:

  1. Click the Vertex AI Workbench link in the notebook list. The link opens the Vertex AI Workbench console.
  2. In the Deploy to notebook screen, type a name for your new Vertex AI Workbench instance and click Create.
  3. In the Ready to open notebook dialog that appears after the instance starts, click Open.
  4. On the Confirm deployment to notebook server page, select Confirm.
  5. Before running the notebook, select Kernel > Restart Kernel and Clear all Outputs.

List of notebooks

Services Description Open in
Classification for tabular data
AutoML Tabular training and prediction.
Learn how to train and make predictions on an AutoML model based on a tabular dataset. Learn more about Classification for tabular data.

Tutorial steps

  • Create a Vertex AI model training job.
  • Train an AutoML Tabular model.
  • Deploy the Model resource to a serving Endpoint resource.
  • Make a prediction by sending data.
  • Undeploy the Model resource.
Colab
GitHub
Vertex AI Workbench
Classification for text data
Create, train, and deploy an AutoML text classification model.
Learn how to use AutoML to train a text classification model. Learn more about Classification for text data.

Tutorial steps

  • Create a Vertex AI Dataset.
  • Train an AutoML text classification Model resource.
  • Obtain the evaluation metrics for the Model resource.
  • Create an Endpoint resource.
  • Deploy the Model resource to the Endpoint resource.
  • Make an online prediction
  • Make a batch prediction
Colab
GitHub
Vertex AI Workbench
Get predictions from an image classification model
AutoML training image classification model for batch prediction.
In this tutorial, you create an AutoML image classification model from a Python script, and then do a batch prediction using the Vertex AI SDK. Learn more about Get predictions from an image classification model.

Tutorial steps

  • Create a Vertex AI Dataset resource.
  • Train the model.
  • View the model evaluation.
  • Make a batch prediction.
Colab
GitHub
Vertex AI Workbench
Get predictions from an image classification model
AutoML training image classification model for online prediction.
In this tutorial, you create an AutoML image classification model and deploy for online prediction from a Python script using the Vertex AI SDK. Learn more about Get predictions from an image classification model.

Tutorial steps

  • Create a Vertex AI Dataset resource.
  • Train the model.
  • View the model evaluation.
  • Deploy the Model resource to a serving Endpoint resource.
  • Make a prediction.
  • Undeploy the Model.
Colab
GitHub
Vertex AI Workbench
AutoML
AutoML training image object detection model for export to edge.
In this tutorial, you create an AutoML image object detection model from a Python script using the Vertex AI SDK, and then export the model as an Edge model in TFLite format.

Tutorial steps

  • Create a Vertex AI Dataset resource.
  • Train the model.
  • Export the Edge model from the Model resource to Cloud Storage.
  • Download the model locally.
  • Make a local prediction.
Colab
GitHub
Vertex AI Workbench
Object detection for image data
AutoML training image object detection model for online prediction.
In this tutorial, you create an AutoML image object detection model and deploy for online prediction from a Python script using the Vertex AI SDK. Learn more about Object detection for image data.

Tutorial steps

  • Create a Vertex AI Dataset resource.
  • Train the model.
  • View the model evaluation.
  • Deploy the Model resource to a serving Endpoint resource.
  • Make a prediction.
  • Undeploy the Model.
Colab
GitHub
Vertex AI Workbench
Tabular Workflow for E2E AutoML
AutoML Tabular Workflow pipelines.
Learn how to create two regression models using Vertex AI Pipelines downloaded from Google Cloud Pipeline Components . Learn more about Tabular Workflow for E2E AutoML.

Tutorial steps

  • Create a training pipeline that reduces the search space from the default to save time.
  • Create a training pipeline that reuses the architecture search results from the previous pipeline to save time.
Colab
GitHub
Vertex AI Workbench
Entity extraction for text data
AutoML training text entity extraction model for batch prediction.
In this tutorial, you create an AutoML text entity extraction model from a Python script, and then do a batch prediction using the Vertex AI SDK. Learn more about Entity extraction for text data.

Tutorial steps

  • Create a Vertex AI Dataset resource.
  • Train the model.
  • View the model evaluation.
  • Make a batch prediction.
Colab
GitHub
Vertex AI Workbench
AutoML
AutoML training text sentiment analysis model for batch prediction.
In this tutorial, you create an AutoML text sentiment analysis model from a Python script, and then do a batch prediction using the Vertex AI SDK.

Tutorial steps

  • Create a Vertex AI Dataset resource.
  • Train the model.
  • View the model evaluation.
  • Make a batch prediction.
Colab
GitHub
Vertex AI Workbench
AutoML training
Get started with AutoML Training.
Learn how to use AutoML for training with Vertex AI. Learn more about AutoML training.

Tutorial steps

  • Train an image model
  • Export the image model as an edge model
  • Train a tabular model
  • Export the tabular model as a cloud model
  • Train a text model
  • Train a video model
Colab
GitHub
Vertex AI Workbench
Hierarchical forecasting for tabular data
AutoML training hierarchical forecasting for batch prediction.
In this tutorial, you create an AutoML hierarchical forecasting model and deploy it for batch prediction using the Vertex AI SDK for Python. Learn more about Hierarchical forecasting for tabular data.

Tutorial steps

  • Create a Vertex AI TimeSeriesDataset resource.
  • Train the model.
  • View the model evaluation.
  • Make a batch prediction.
Colab
GitHub
Vertex AI Workbench
Object detection for image data
AutoML training image object detection model for batch prediction.
In this tutorial, you create an AutoML image object detection model from a Python script, and then do a batch prediction using the Vertex AI SDK. Learn more about Object detection for image data.

Tutorial steps

  • Create a Vertex AI Dataset resource.
  • Train the model.
  • View the model evaluation.
  • Make a batch prediction.
Colab
GitHub
Vertex AI Workbench
Forecasting for tabular data
AutoML tabular forecasting model for batch prediction.
Learn how to create an AutoML tabular forecasting model from a Python script, and then do a batch prediction using the Vertex AI SDK. Learn more about Forecasting for tabular data.

Tutorial steps

  • Create a Vertex AI Dataset resource.
  • Train an AutoML tabular forecasting Model resource.
  • Obtain the evaluation metrics for the Model resource.
  • Make a batch prediction.
Colab
GitHub
Vertex AI Workbench
Regression for tabular data
AutoML training tabular regression model for batch prediction using BigQuery.
Learn how to create an AutoML tabular regression model and deploy it for batch prediction using the Vertex AI SDK for Python. Learn more about Regression for tabular data.

Tutorial steps

  • Create a Vertex AI Dataset resource.
  • Train the model.
  • View the model evaluation.
  • Deploy the Model resource to a serving Endpoint resource.
  • Make a prediction.
  • Undeploy the Model.
Colab
GitHub
Vertex AI Workbench
Regression for tabular data
AutoML training tabular regression model for online prediction using BigQuery.
Learn how to create an AutoML tabular regression model and deploy for online prediction from a Python script using the Vertex AI SDK. Learn more about Regression for tabular data.

Tutorial steps

  • Create a Vertex AI Dataset resource.
  • Train the model.
  • View the model evaluation.
  • Deploy the Model resource to a serving Endpoint resource.
  • Make a prediction.
  • Undeploy the Model.
Colab
GitHub
Vertex AI Workbench
Entity extraction for text data
AutoML training text entity extraction model for online prediction.
Learn how to create an AutoML text entity extraction model and deploy for online prediction from a Python script using the Vertex AI SDK. Learn more about Entity extraction for text data.

Tutorial steps

  • Create a Vertex AI Dataset resource.
  • Train the model.
  • View the model evaluation.
  • Deploy the Model resource to a serving Endpoint resource.
  • Make a prediction.
  • Undeploy the Model.
Colab
GitHub
Vertex AI Workbench
Sentiment analysis for text data
Training an AutoML text sentiment analysis model for online predictions.
Learn how to create an AutoML text sentiment analysis model and deploy it for online predictions from a Python script using the Vertex AI SDK. Learn more about Sentiment analysis for text data.

Tutorial steps

  • Create a Vertex AI Dataset resource.
  • Create a training job for the AutoML model on the dataset.
  • View the model evaluation metrics.
  • Deploy the Vertex AI Model resource to a serving Vertex AI Endpoint.
  • Make a prediction request to the deployed model.
  • Undeploy the model from endpoint.
  • Perform clean up process.
Colab
GitHub
Vertex AI Workbench
Action recognition for video data
AutoML training video action recognition model for batch prediction.
Learn how to create an AutoML video action recognition model from a Python script, and then do a batch prediction using the Vertex AI SDK. Learn more about Action recognition for video data.

Tutorial steps

  • Create a Vertex AI Dataset resource.
  • Train the model.
  • View the model evaluation.
  • Make a batch prediction.
Colab
GitHub
Vertex AI Workbench
Classification for video data
AutoML training video classification model for batch prediction.
Learn how to create an AutoML video classification model from a Python script, and then do a batch prediction using the Vertex AI SDK. Learn more about Classification for video data.

Tutorial steps

  • Create a Vertex AI Dataset resource.
  • Train the model.
  • View the model evaluation.
  • Make a batch prediction.
Colab
GitHub
Vertex AI Workbench
Object tracking for video data
AutoML training video object tracking model for batch prediction.
Learn how to create an AutoML video object tracking model from a Python script, and then do a batch prediction using the Vertex AI SDK. Learn more about Object tracking for video data.

Tutorial steps

  • Create a Vertex AI Dataset resource.
  • Train the model.
  • View the model evaluation.
  • Make a batch prediction.
Colab
GitHub
Vertex AI Workbench
BigQuery ML
Get started with BigQuery ML Training.
Learn how to use BigQueryML for training with Vertex AI. Learn more about BigQuery ML.

Tutorial steps

  • Create a local BigQuery table in your project
  • Train a BigQuery ML model
  • Evaluate the BigQuery ML model
  • Export the BigQuery ML model as a cloud model
  • Upload the exported model as a Vertex AI Model resource
  • Hyperparameter tune a BigQuery ML model with Vertex AI Vizier
  • Automatically register a BigQuery ML model to Vertex AI Model Registry
Colab
GitHub
Vertex AI Workbench
Custom training
Vertex AI Prediction
Deploying Iris-detection model using FastAPI and Vertex AI custom container serving.
Learn how to create, deploy and serve a custom classification model on Vertex AI. Learn more about Custom training. Learn more about Vertex AI Prediction.

Tutorial steps

  • Train a model that uses flower's measurements as input to predict the class of iris.
  • Save the model and its serialized preprocessor.
  • Build a FastAPI server to handle predictions and health checks.
  • Build a custom container with model artifacts.
  • Upload and deploy custom container to Vertex AI Endpoints.
Colab
GitHub
Vertex AI Workbench
Vertex AI Training
Training a TensorFlow model on BigQuery data.
Learn how to create a custom-trained model from a Python script in a Docker container using the Vertex AI SDK for Python, and then get a prediction from the deployed model by sending data. Learn more about Vertex AI Training.

Tutorial steps

  • Create a Vertex AI custom TrainingPipeline for training a model.
  • Train a TensorFlow model.
  • Deploy the Model resource to a serving Endpoint resource.
  • Make a prediction.
  • Undeploy the Model resource.
Colab
GitHub
Vertex AI Workbench
Custom training
Custom training with custom training container and automatic registering of the model.
In this tutorial, you create a custom model from a Python script in a custom Docker container using the Vertex AI SDK, and automatically register the model in the Vertex AI Model Registry. Learn more about Custom training.

Tutorial steps

  • Create a Vertex AI custom job for training a model.
  • Train and register a TensorFlow model using a custom container,
  • List the registered model from the Vertex AI Model Registry.
Colab
GitHub
Vertex AI Workbench
Vertex AI TensorBoard Profiler
Profile model training performance using Profiler.
Learn how to enable Vertex AI TensorBoard Profiler for custom training jobs. Learn more about Vertex AI TensorBoard Profiler.

Tutorial steps

  • Setup a service account and a Cloud Storage bucket
  • Create a Vertex AI TensorBoard instance
  • Create and run a custom training job
  • View the Vertex AI TensorBoard Profiler dashboard
Colab
GitHub
Vertex AI Workbench
Custom training
Get started with Vertex AI Training for XGBoost.
Learn how to use Vertex AI Training for training a XGBoost custom model. Learn more about Custom training.

Tutorial steps

  • Training using a Python package.
  • Report accuracy when hyperparameter tuning.
  • Save the model artifacts to Cloud Storage using Cloud StorageFuse.
  • Create a Vertex AI Model resource.
Colab
GitHub
Vertex AI Workbench
Shared resources across deployments
Get started with Endpoint and shared VM.
Learn how to use deployment resource pools for deploying models. Learn more about Shared resources across deployments.

Tutorial steps

  • Upload a pretrained image classification model as a Model resource (model A).
  • Upload a pretrained text sentence encoder model as a Model resource (model B).
  • Create a shared VM deployment resource pool.
  • List shared VM deployment resource pools.
  • Create two Endpoint resources.
  • Deploy first model (model A) to first Endpoint resource using deployment resource pool.
  • Deploy second model (model B) to second Endpoint resource using deployment resource pool.
  • Make a prediction request with first deployed model (model A).
  • Make a prediction request with second deployed model (model B).
Colab
GitHub
Vertex AI Workbench
Custom training
Vertex AI Batch Prediction
Custom training and batch prediction.
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. Learn more about Custom training. Learn more about Vertex AI Batch Prediction.

Tutorial steps

  • Create a Vertex AI custom job for training a TensorFlow model.
  • Upload the trained model artifacts as a Model resource.
  • Make a batch prediction.
Colab
GitHub
Vertex AI Workbench
Custom training
Vertex AI Prediction
Custom training and online prediction.
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. Learn more about Custom training. Learn more about Vertex AI Prediction.

Tutorial steps

  • Create a Vertex AI custom job for training a TensorFlow model.
  • Upload the trained model artifacts to a Model resource.
  • Create a serving Endpoint resource.
  • Deploy the Model resource to a serving Endpoint resource.
  • Make a prediction.
  • Undeploy the Model resource.
Colab
GitHub
Vertex AI Workbench
BigQuery Datasets
Vertex AI for BigQuery users
Get started with BigQuery datasets.
Learn how to use BigQuery as a dataset for training with Vertex AI. Learn more about BigQuery Datasets. Learn more about Vertex AI for BigQuery users.

Tutorial steps

  • Create a Vertex AI Dataset resource from BigQuery table compatible for AutoML training.
  • Extract a copy of the dataset from BigQuery to a CSV file in Cloud Storage compatible for AutoML or custom training.
  • Select rows from a BigQuery dataset into a pandas dataframe compatible for custom training.
  • Select rows from a BigQuery dataset into a tf.data.Dataset compatible for custom training TensorFlow models.
  • Select rows from extracted CSV files into a tf.data.Dataset compatible for custom training TensorFlow models.
  • Create a BigQuery dataset from CSV files.
  • Extract data from BigQuery table into a DMatrix compatible for custom training XGBoost models.
Colab
GitHub
Vertex AI Workbench
Vertex AI Data Labeling
Get started with Vertex AI Data Labeling.
Learn how to use the Vertex AI Data Labeling service. Learn more about Vertex AI Data Labeling.

Tutorial steps

  • Create a Specialist Pool for data labelers.
  • Create a data labeling job.
  • Submit the data labeling job.
  • List data labeling jobs.
  • Cancel a data labeling job.
Colab
GitHub
Vertex AI Workbench
Vertex AI Experiments
Vertex ML Metadata
Build Vertex AI Experiment lineage for custom training.
Learn how to integrate preprocessing code in a Vertex AI experiments. Learn more about Vertex AI Experiments. Learn more about Vertex ML Metadata.

Tutorial steps

  • Execute module for preprocessing data
  • Create a dataset artifact
  • Log parameters
  • Execute module for training the model
  • Log parameters
  • Create model artifact
  • Assign tracking lineage to dataset, model and parameters
Colab
GitHub
Vertex AI Workbench
Vertex AI Experiments
Track parameters and metrics for locally trained models.
Learn how to use Vertex AI Experiments to compare and evaluate model experiments. Learn more about Vertex AI Experiments.

Tutorial steps

  • log the model parameters
  • log the loss and metrics on every epoch to Vertex AI TensorBoard
  • log the evaluation metrics
Colab
GitHub
Vertex AI Workbench
Vertex AI Experiments
Vertex AI Pipelines
Compare pipeline runs with Vertex AI Experiments.
Learn how to use Vertex AI Experiments to log a pipeline job and compare different pipeline jobs. Learn more about Vertex AI Experiments. Learn more about Vertex AI Pipelines.

Tutorial steps

  • Formalize a training component
  • Build a training pipeline
  • Run several Pipeline jobs and log their results
  • Compare different Pipeline jobs
Colab
GitHub
Vertex AI Workbench
Vertex AI TensorBoard
Delete Outdated Experiments in Vertex AI TensorBoard.
Learn how to delete outdated Vertex AI TensorBoard Experiments to avoid unnecessary storage costs. Learn more about Vertex AI TensorBoard.

Tutorial steps

  • How to delete the TB Experiment with a predefined keyvalue label pair
  • How to delete the TB Experiments created before the create_time
  • How to delete the TB Experiments created before the update_time
Colab
GitHub
Vertex AI Workbench
Vertex AI Experiments
Custom training autologging - Local script.
Learn how to autolog parameters and metrics of an ML experiment running on Vertex AI training by leveraging the integration with Vertex AI Experiments. Learn more about Vertex AI Experiments.

Tutorial steps

  • Formalize model experiment in a script
  • Run model traning using local script on Vertex AI Training
  • Check out ML experiment parameters and metrics in Vertex AI Experiments
Colab
GitHub
Vertex AI Workbench
Vertex AI Experiments
Vertex ML Metadata
Custom training
Get started with Vertex AI Experiments.
Learn how to use Vertex AI Experiments when training with Vertex AI. Learn more about Vertex AI Experiments. Learn more about Vertex ML Metadata. Learn more about Custom training.

Tutorial steps

  • Local (notebook) Training
  • Create an experiment
  • Create a first run in the experiment
  • Log parameters and metrics
  • Create artifact lineage
  • Visualize the experiment results
  • Execute a second run
  • Compare the two runs in the experiment
  • Cloud (Vertex AI) Training
  • Within the training script
Colab
GitHub
Vertex AI Workbench
Vertex AI Experiments
Autologging.
Learn how to use Vertex AI Autologging.

Tutorial steps

  • Enable autologging in the Vertex AI SDK.
  • Train scikitlearn model and see the resulting experiment run with metrics and parameters autologged to Vertex AI Experiments without setting an experiment run.
  • Train Tensorflow model, check autologged metrics and parameters to Vertex AI Experiments by manually setting an experiment run with aiplatform.start_run() and aiplatform.end_run().
  • Disable autologging in the Vertex AI SDK, train a PyTorch model and check that none of the parameters or metrics are logged.
Colab
GitHub
Vertex AI Workbench
Classification for tabular data
Vertex Explainable AI
AutoML training tabular binary classification model for batch explanation.
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. Learn more about Classification for tabular data. Learn more about Vertex Explainable AI.

Tutorial steps

  • Create a Vertex AI Dataset resource.
  • Train an AutoML tabular binary classification model.
  • View the model evaluation metrics for the trained model.
  • Make a batch prediction request with explainability.
Colab
GitHub
Vertex AI Workbench
Classification for tabular data
Vertex Explainable AI
AutoML training tabular classification model for online explanation.
Learn how 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. Learn more about Classification for tabular data. Learn more about Vertex Explainable AI.

Tutorial steps

  • Create a Vertex AI Dataset resource.
  • Train an AutoML tabular binary classification model.
  • View the model evaluation metrics for the trained model.
  • Create a serving Endpoint resource.
  • Deploy the Model resource to a serving Endpoint resource.
  • Make an online prediction request with explainability.
  • Undeploy the Model resource.
Colab
GitHub
Vertex AI Workbench
Vertex Explainable AI
Vertex AI Batch Prediction
Custom training image classification model for batch prediction with explainabilty.
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. Learn more about Vertex Explainable AI. Learn more about Vertex AI Batch Prediction.

Tutorial steps

  • Create a Vertex AI custom 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 Model resource.
  • Make a batch prediction with explanations.
Colab
GitHub
Vertex AI Workbench
Vertex Explainable AI
Vertex AI Prediction
Custom training image classification model for online prediction with explainability.
Learn how 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. Learn more about Vertex Explainable AI. Learn more about Vertex AI Prediction.

Tutorial steps

  • Create a Vertex AI custom 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 Model resource.
  • Create a serving Endpoint resource.
  • Deploy the Model resource to a serving Endpoint resource.
  • Make a prediction with explanation.
  • Undeploy the Model resource.
Colab
GitHub
Vertex AI Workbench
Vertex Explainable AI
Vertex AI Batch Prediction
Custom training tabular regression model for batch prediction with explainabilty.
Learn how 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. Learn more about Vertex Explainable AI. Learn more about Vertex AI Batch Prediction.

Tutorial steps

  • Create a Vertex AI custom 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 Model resource.
  • Make a batch prediction with explanations.
Colab
GitHub
Vertex AI Workbench
Vertex Explainable AI
Vertex AI Prediction
Custom training tabular regression model for online prediction with explainabilty.
Learn how 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. Learn more about Vertex Explainable AI. Learn more about Vertex AI Prediction.

Tutorial steps

  • Create a Vertex AI custom 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 Model resource.
  • Create a serving Endpoint resource.
  • Deploy the Model resource to a serving Endpoint resource.
  • Make a prediction with explanation.
  • Undeploy the Model resource.
Colab
GitHub
Vertex AI Workbench
Vertex Explainable AI
Vertex AI Prediction
Custom training tabular regression model for online prediction with explainabilty using get_metadata.
Learn how to create a custom model from a Python script in a Google prebuilt Docker container using the Vertex AI SDK, and then do a prediction with explanations on the deployed model by sending data. Learn more about Vertex Explainable AI. Learn more about Vertex AI Prediction.

Tutorial steps

  • Create a Vertex custom job for training a model.
  • Train a TensorFlow model.
  • Retrieve and load the model artifacts.
  • View the model evaluation.
  • Set explanation parameters.
  • Upload the model as a Vertex AI Model resource.
  • Deploy the Model resource to a serving Endpoint resource.
  • Make a prediction with explanation.
  • Undeploy the Model resource.
Colab
GitHub
Vertex AI Workbench
Vertex Explainable AI
Vertex AI Prediction
Explaining image classification with Vertex Explainable AI.
Learn how to configure feature-based explanations on a pre-trained image classification model and make online and batch predictions with explanations. Learn more about Vertex Explainable AI. Learn more about Vertex AI Prediction.

Tutorial steps

  • Download pretrained model from TensorFlow Hub
  • Upload model for deployment
  • Deploy model for online prediction
  • Make online prediction with explanations
  • Make batch predictions with explanations
Colab
GitHub
Vertex AI Workbench
Vertex Explainable AI
Explaining text classification with Vertex Explainable AI.
Learn how to configure feature-based explanations using **sampled Shapley method** on a TensorFlow text classification model for online predictions with explanations. Learn more about Vertex Explainable AI.

Tutorial steps

  • Build and train a TensorFlow text classification model
  • Upload model for deployment
  • Deploy model for online prediction
  • Make online prediction with explanations
Colab
GitHub
Vertex AI Workbench
Vertex AI Feature Store
Streaming import SDK.
Learn how to import features from a Pandas DataFrame into Vertex AI Feature Store using write_feature_values method from the Vertex AI SDK. Learn more about Vertex AI Feature Store.

Tutorial steps

  • Create a featurestore.
  • Create a new entity type for your featurestore.
  • Import feature values from Pandas DataFrame into the entity type in the featurestore.
Colab
GitHub
Vertex AI Workbench
Vertex AI Feature Store
Online feature serving and fetching of BigQuery data with Vertex AI Feature Store.
Learn how to create and use an online feature store instance to host and serve data in BigQuery with Vertex AI Feature Store in an end to end workflow of feature values serving and fetching user journey. Learn more about Vertex AI Feature Store.

Tutorial steps

  • Provision an online feature store instance to host and serve data.
  • Register a BigQuery view with the online feature store instance and set up the sync job.
  • Use the online server to fetch feature values for online prediction.
Colab
GitHub
Vertex AI Workbench
Vertex AI Feature Store
Online feature serving and fetching of BigQuery data with Vertex AI Feature Store Optimized Serving.
Learn how to create and use an online feature store instance to host and serve data in BigQuery with Vertex AI Feature Store in an end-to-end workflow of serving and fetching feature values. Learn more about Vertex AI Feature Store.

Tutorial steps

  • Provision an online feature store instance to host and serve data using Optimized online serving with Public or Private endpoint.
  • Register a BigQuery view with the online feature store instance and set up the sync job.
  • Use the online server to fetch feature values for online prediction.
Colab
GitHub
Vertex AI Workbench
Vertex AI Feature Store
Online feature serving and vector retrieval of BigQuery data with Vertex AI Feature Store.
Learn how to create and use an online feature store instance to host and serve data in BigQuery with Vertex AI Feature Store in an end to end workflow of features serving and vector retrieval user journey. Learn more about Vertex AI Feature Store.

Tutorial steps

  • Provision an online feature store instance to host and serve data.
  • Create an online feature store instance to serve a BigQuery table.
  • Use the online server to search nearest neighbors.
Colab
GitHub
Vertex AI Workbench
Vertex AI Feature Store
Using Vertex AI Feature Store (Legacy) with Pandas Dataframe.
Learn how to use Vertex AI Feature Store with pandas Dataframe. Learn more about Vertex AI Feature Store.

Tutorial steps

  • Create Featurestore, EntityType, and Feature resources.
  • Import feature values from Pandas DataFrame into the entity type.
  • Read entity feature values from the online feature store into Pandas DataFrame.
  • Batch serve feature values from your featurestore into Pandas DataFrame.
  • Online serving with updated feature values.
  • Pointintime correctness to fetch feature values for training.
Colab
GitHub
Vertex AI Workbench
Vertex AI Feature Store
Online and Batch predictions using Vertex AI Feature Store (Legacy).
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. Learn more about Vertex AI Feature Store.

Tutorial steps

  • Create Featurestore, EntityType, and Feature resources.
  • Import feature data into the Featurestore resource.
  • Serve online prediction requests using the imported features.
  • Access imported features in offline jobs, such as training jobs.
  • Use streaming import to import small amount of data.
Colab
GitHub
Vertex AI Workbench
Overview of Generative AI support on Vertex AI
Vertex AI LLM Evaluation & Batch Inference.
Learn to use Vertex AI to evaluate a large language model. Learn more about Overview of Generative AI support on Vertex AI.

Tutorial steps

  • Create Vertex AI Pipeline job using a predefined template for bulk inference.
  • Execute the pipeline using Vertex AI Pipelines.
  • Produce prediction results against a model for a given dataset.
GitHub
Vertex AI Workbench
Tune text models by using RLHF tuning
Vertex AI LLM Reinforcement Learning from Human Feedback.
In this tutorial, you will use Vertex AI RLHF to tune and deploy a large language model model. Learn more about Tune text models by using RLHF tuning.

Tutorial steps

  • Set the number of model tuning steps.
  • Create Vertex AI Pipeline job using a predefined template for tuning.
  • Execute the pipeline using Vertex AI Pipelines.
  • Perform online prediction with the tuned model.
Colab
GitHub
Vertex AI Workbench
text embedding
Semantic Search using Embeddings.
In this tutorial, we demonstrate how to create an embedding generated from text and perform a semantic search. Learn more about text embedding.

Tutorial steps

  • Installation and imports
  • Create embedding dataset
  • Create an index
  • Query the index
Colab
GitHub
Vertex AI Workbench
text embedding api
Text Embedding New API.
Learn how to call text embedding latest APIs on two new models, textembedding-gecko@002 and textembedding-gecko-multilingual@001: Learn more about text embedding api.

Tutorial steps

  • Installation and imports
  • Generate embeddings
Colab
GitHub
Vertex AI Workbench
Tune text models by using supervised tuning
Vertex AI Tuning a PEFT model.
Learn to use Vertex AI LLM to tune and deploy a PEFT large language model. Learn more about Tune text models by using supervised tuning.

Tutorial steps

  • Get the Vertex AI LLM model.
  • Tune the model.
  • This will automatically create a Vertex AI endpoint and deploy the model to it.
  • Make a prediction using Vertex AI LLM.
  • Make a prediction using Vertex AI Prediction
Colab
GitHub
Vertex AI Workbench
PaLM API
Using the Vertex AI SDK with Large Language Models.
Learn how to provide text input to Large Language Models available on Vertex AI to test, tune, and deploy generative AI language models. Learn more about PaLM API.

Tutorial steps

  • Use the predict endpoints of Vertex AI PaLM API to receive generative AI responses to a message.
  • Use the text embedding endpoint to receive a vector representation of a message.
  • Perform prompt tuning of an LLM, based on input/output training data.
Colab
GitHub
Vertex AI Workbench
Vector Search
Using Vertex AI Multimodal Embeddings and Vector Search.
Learn how to encode custom text embeddings, create an Approximate Nearest Neighbor index, and query against indexes.

Tutorial steps

  • Convert an image dataset to embeddings
  • Create an index
  • Upload embeddings to the index
  • Create an index endpoint
  • Deploy the index to the index endpoint
  • Perform an online query
Colab
GitHub
Vertex AI Workbench
Vector Search
Using Vector Search for StackOverflow Questions.
Learn how to encode custom text embeddings, create an Approximate Nearest Neighbor index, and query against indexes. Learn more about Vector Search.

Tutorial steps

  • Create ANN index
  • Create an index endpoint with VPC Network
  • Deploy ANN index
  • Perform online query
Colab
GitHub
Vertex AI Workbench
Vector Search
Vertex AI Embeddings for Text
Using Vector Search and Vertex AI Embeddings for Text for StackOverflow Questions.
Learn how to encode text embeddings, create an Approximate Nearest Neighbor index, and query against indexes. Learn more about Vector Search. Learn more about Vertex AI Embeddings for Text.

Tutorial steps

  • Convert a BigQuery dataset to embeddings
  • Create an index
  • Upload embeddings to the index
  • Create an index endpoint
  • Deploy the index to the index endpoint
  • Perform an online query
Colab
GitHub
Vertex AI Workbench
Vector Search
Create Vector Search index.
Learn how to create Approximate Nearest Neighbor Index, query against indexes, and validate the performance of the index. Learn more about Vector Search.

Tutorial steps

  • Create ANN Index and Brute Force Index
  • Create an IndexEndpoint with VPC Network
  • Deploy ANN Index and Brute Force Index
  • Perform online query
  • Compute recall
Colab
GitHub
Vertex AI Workbench
Migrate to Vertex AI
Classification for image data
AutoML Image Classification.
Learn to use AutoML to train an image model and use Vertex AI Prediction and Vertex AI Batch Prediction to do online and batch predictions. Learn more about Migrate to Vertex AI. Learn more about Classification for image data.

Tutorial steps

  • Train an AutoML image classification model.
  • Make a batch prediction.
  • Deploy model to a endpoint
  • Make a online prediction
Colab
GitHub
Vertex AI Workbench
Migrate to Vertex AI
Object detection for image data
AutoML image object detection.
Learn to use AutoML to train an image model and use Vertex AI Prediction and Vertex AI Batch Prediction to do online and batch predictions. Learn more about Migrate to Vertex AI. Learn more about Object detection for image data.

Tutorial steps

  • Train an AutoML object detection model.
  • Make a batch prediction.
  • Deploy model to a endpoint
  • Make a online prediction
Colab
GitHub
Vertex AI Workbench
Migrate to Vertex AI
Object tracking for video data
AutoML Video Object Tracking.
Learn to use AutoML to train a video model and use Vertex AI Batch Prediction to do batch predictions. Learn more about Migrate to Vertex AI. Learn more about Object tracking for video data.

Tutorial steps

  • Train an AutoML video object tracking model.
  • Make a batch prediction.
Colab
GitHub
Vertex AI Workbench
Migrate to Vertex AI
Classification for tabular data
AutoML tabular binary classification.
In this tutorial, you create an AutoML tabular binary classification model and deploy for online prediction from a Python script using the Vertex AI SDK. Learn more about Migrate to Vertex AI. Learn more about Classification for tabular data.

Tutorial steps

  • Create a Vertex AI Dataset resource.
  • Train the model.
  • View the model evaluation.
  • Deploy the Model resource to a serving Endpoint resource.
  • Make a prediction.
  • Undeploy the Model
Colab
GitHub
Vertex AI Workbench
Migrate to Vertex AI
Classification for text data
AutoML Text Classification.
The objective of this notebook is to build a AutoML Text Classification Model. Learn more about Migrate to Vertex AI. Learn more about Classification for text data.

Tutorial steps

  • Set your task name, and Cloud Storage prefix
  • Copy AutoML text demo train data for creating managed dataset
  • Create a dataset on Vertex AI.
  • Configure a training job
  • Launch a training job and create a model on Vertex AI
  • Copy AutoML Text Demo Prediction Data for creating batch prediction job
  • Perform batch prediction job on the model
Colab
GitHub
Vertex AI Workbench
Migrate to Vertex AI
Entity extraction for text data
AutoML Text Entity Extraction.
The objective of this notebook is to build a AutoML Text Entity Extraction model. Learn more about Migrate to Vertex AI. Learn more about Entity extraction for text data.

Tutorial steps

  • Set your task name, and Cloud Storage prefix
  • Copy AutoML video demo train data for creating managed dataset
  • Create a dataset on Vertex AI.
  • Configure a training job
  • Launch a training job and create a model on Vertex AI
  • Copy AutoML Video Demo Prediction Data for creating batch prediction job
  • Perform batch prediction job on the model
Colab
GitHub
Vertex AI Workbench
Migrate to Vertex AI
Sentiment analysis for text data
AutoML Text Sentiment Analysis.
The objective of this notebook is to build a AutoML Text Sentiment Analysis model. Learn more about Migrate to Vertex AI. Learn more about Sentiment analysis for text data.

Tutorial steps

  • Copy AutoML video demo train data for creating managed dataset
  • Create a dataset on Vertex AI.
  • Configure a training job
  • Launch a training job and create a model on Vertex AI
  • Copy AutoML Video Demo Prediction Data for creating batch prediction job
  • Perform batch prediction job on the model
Colab
GitHub
Vertex AI Workbench
Migrate to Vertex AI
Classification for video data
AutoML Video Classification.
Learn to use AutoML to train a video model and use Vertex AI Batch Prediction to do batch predictions. Learn more about Migrate to Vertex AI. Learn more about Classification for video data.

Tutorial steps

  • Train an AutoML video classification model.
  • Make a batch prediction.
Colab
GitHub
Vertex AI Workbench
Migrate to Vertex AI
Custom training
Custom image classification with a custom training container.
Learn how to train a tensorflow image classification model using a custom container and Vertex AI training. Learn more about Migrate to Vertex AI. Learn more about Custom training.

Tutorial steps

  • Package the training code into a python application.
  • Containerize the training application using Cloud Build and Artifact Registry.
  • Create a custom container training job in Vertex AI and run it.
  • Evaluate the model generated from the training job.
  • Create a model resource for the trained model in Vertex AI Model Registry.
  • Run a Vertex AI batch prediction job.
  • Deploy the model resource to a Vertex AI Endpoint.
  • Run a online prediction job on the model resource.
  • Clean up the resources created.
Colab
GitHub
Vertex AI Workbench
Migrate to Vertex AI
Custom training
Custom image classification with a pre-built training container.
Learn how to train a tensorflow image classification model using a prebuilt container and Vertex AI training. Learn more about Migrate to Vertex AI. Learn more about Custom training.

Tutorial steps

  • Package the training code into a python application.
  • Containerize the training application using Cloud Build and Artifact Registry.
  • Create a custom container training job in Vertex AI and run it.
  • Evaluate the model generated from the training job.
  • Create a model resource for the trained model in Vertex AI Model Registry.
  • Run a Vertex AI batch prediction job.
  • Deploy the model resource to a Vertex AI Endpoint.
  • Run a online prediction job on the model resource.
  • Clean up the resources created.
Colab
GitHub
Vertex AI Workbench
Migrate to Vertex AI
Custom training
Custom Scikit-Learn model with pre-built training container.
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. Learn more about Migrate to Vertex AI. Learn more about Custom training.

Tutorial steps

  • Create a Vertex AI custom job for training a scikitlearn model.
  • Upload the trained model artifacts as a Model resource.
  • Make a batch prediction.
  • Deploy model to a endpoint
  • Make a online prediction
Colab
GitHub
Vertex AI Workbench
Migrate to Vertex AI
Custom training
Custom XGBoost model with pre-built training container.
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. Learn more about Migrate to Vertex AI. Learn more about Custom training.

Tutorial steps

  • Create a Vertex AI custom job for training a scikitlearn model.
  • Upload the trained model artifacts as a Model resource.
  • Make a batch prediction.
  • Deploy model to a endpoint
  • Make a online prediction
Colab
GitHub
Vertex AI Workbench
Migrate to Vertex AI
Custom training
Hyperparameter Tuning.
Learn to use Vertex AI Hyperparameter to create and tune a custom trained model. Learn more about Migrate to Vertex AI. Learn more about Custom training.

Tutorial steps

  • Create a Vertex AI hyperparameter tuning job for training a TensorFlow model.
Colab
GitHub
Vertex AI Workbench
Google Artifact Registry documentation
Get started with Google Artifact Registry.
Learn how to use Google Artifact Registry. Learn more about Google Artifact Registry documentation.

Tutorial steps

  • Creating a private Docker repository.
  • Tagging a container image, specific to the private Docker repository.
  • Pushing a container image to the private Docker repository.
  • Pulling a container image from the private Docker repository.
  • Deleting a private Docker repository.
Colab
GitHub
Vertex AI Workbench
Vertex ML Metadata
Custom training
Vertex AI Experiments
Track parameters and metrics for custom training jobs.
Learn how to use Vertex AI SDK for Python to: Learn more about Vertex ML Metadata. Learn more about Custom training. Learn more about Vertex AI Experiments.

Tutorial steps

  • Track training parameters and prediction metrics for a custom training job.
  • Extract and perform analysis for all parameters and metrics within an Experiment.
Colab
GitHub
Vertex AI Workbench
Vertex ML Metadata
Track parameters and metrics for locally trained models.
Learn how to use Vertex ML Metadata to track training parameters and evaluation metrics. Learn more about Vertex ML Metadata.

Tutorial steps

  • Track parameters and metrics for a locally trained model.
  • Extract and perform analysis for all parameters and metrics within an Experiment.
Colab
GitHub
Vertex AI Workbench
Vertex ML Metadata
Vertex AI Pipelines
Track artifacts and metrics across Vertex AI Pipelines runs using Vertex ML Metadata.
Learn how to track artifacts and metrics with Vertex ML Metadata in Vertex AI Pipeline runs. Learn more about Vertex ML Metadata. Learn more about Vertex AI Pipelines.

Tutorial steps

  • Use the Kubeflow Pipelines SDK to build an ML pipeline that runs on Vertex AI
  • The pipeline will create a dataset, train a scikitlearn model, and deploy the model to an endpoint
  • Write custom pipeline components that generate artifacts and metadata
  • Compare Vertex AI Pipelines runs, both in the Cloud console and programmatically
  • Trace the lineage for pipelinegenerated artifacts
  • Query your pipeline run metadata
Colab
GitHub
Vertex AI Workbench
Vertex AI Model Evaluation
Classification for tabular data
Evaluating batch prediction results from an AutoML Tabular classification model.
Learn how to train a Vertex AI AutoML Tabular classification model and learn how to evaluate it through a Vertex AI pipeline job using google_cloud_pipeline_components: Learn more about Vertex AI Model Evaluation. Learn more about Classification for tabular data.

Tutorial steps

  • Create a Vertex AI Dataset.
  • Train an Automl Tabular classification model on the Dataset resource.
  • Import the trained AutoML model resource into the pipeline.
  • Run a Batch Prediction job.
  • Evaluate the AutoML model using the Classification Evaluation component.
  • Import the classification metrics to the AutoML model resource.
Colab
GitHub
Vertex AI Workbench
Vertex AI Model Evaluation
Regression for tabular data
Evaluating batch prediction results from AutoML Tabular regression model.
Learn how to evaluate a Vertex AI model resource through a Vertex AI pipeline job using google_cloud_pipeline_components: Learn more about Vertex AI Model Evaluation. Learn more about Regression for tabular data.

Tutorial steps

  • Create a Vertex AI Dataset
  • Configure a AutoMLTabularTrainingJob
  • Run the AutoMLTabularTrainingJob which returns a model
  • Import a pretrained AutoML model resource into the pipeline
  • Run a batch prediction job in the pipeline
  • Evaluate the AutoML model using the regression evaluation component
  • Import the Regression Metrics to the AutoML model resource
Colab
GitHub
Vertex AI Workbench
Vertex AI Model Evaluation
Classification on text data
AutoML text classification pipelines using google-cloud-pipeline-components.
Learn how to use Vertex AI Pipelines and Google Cloud Pipeline Components to build and evaluate an AutoML text classification model. Learn more about Vertex AI Model Evaluation. Learn more about Classification on text data.

Tutorial steps

  • Create a Vertex AI Dataset.
  • Train an Automl Text Classification model on the Dataset resource.
  • Import the trained AutoML model resource into the pipeline.
  • Run a Batch Prediction job.
  • Evaluate the AutoML model using the Classification Evaluation Component.
  • Import the evaluation metrics to the AutoML model resource.
Colab
GitHub
Vertex AI Workbench
Vertex AI Model Evaluation
Classification for video data
Evaluating batch prediction results from AutoML Video classification model.
Learn how to train a Vertex AI AutoML Video classification model and learn how to evaluate it through a Vertex AI pipeline job using google_cloud_pipeline_components: Learn more about Vertex AI Model Evaluation. Learn more about Classification for video data.

Tutorial steps

  • Create a Vertex AI Dataset.
  • Train a Automl Video Classification model on the Vertex AI Dataset resource.
  • Import the trained AutoML Vertex AI Model resource into the pipeline.
  • Run a batch prediction job inside the pipeline.
  • Evaluate the AutoML model using the classification evaluation component.
  • Import the classification metrics to the AutoML Vertex AI Model resource.
Colab
GitHub
Vertex AI Workbench
Vertex AI Model Evaluation
Vertex AI Training
Evaluating BatchPrediction results from a custom tabular classification model.
In this tutorial, you train a scikit-learn RandomForest model, save it in Vertex AI Model Registry and learn how to evaluate it through a Vertex AI pipeline job using google_cloud_pipeline_components. Learn more about Vertex AI Model Evaluation. Learn more about Vertex AI Training.

Tutorial steps

  • Fetch the dataset from the public source.
  • Preprocess the data locally and save test data in BigQuery.
  • Train a RandomForest classification model locally using scikitlearn Python package.
  • Create a custom container in Artifact Registry for predictions.
  • Upload the model in Vertex AI Model Registry.
  • Create and run a Vertex AI Pipeline that
Colab
GitHub
Vertex AI Workbench
Vertex AI Model Evaluation
Custom training
Evaluating batch prediction results from custom tabular regression model.
Learn how to evaluate a Vertex AI model resource through a Vertex AI pipeline job using google_cloud_pipeline_components: Learn more about Vertex AI Model Evaluation. Learn more about Custom training.

Tutorial steps

  • Create a Vertex AI CustomTrainingJob for training a model.
  • Run the CustomTrainingJob
  • Retrieve and load the model artifacts.
  • View the model evaluation.
  • Upload the model as a Vertex AI Model resource.
  • Import a pretrained Vertex AI model resource into the pipeline.
  • Run a batch prediction job in the pipeline.
  • Evaluate the model using the regression evaluation component.
  • Import the Regression Metrics to the Vertex AI model resource.
Colab
GitHub
Vertex AI Workbench
Model evaluation in Vertex AI
Get started with importing a custom model evaluation to the Vertex AI Model Registry.
Learn how to construct and upload a custom model evaluation, and upload the custom model evaluation to a Model resource entry in Vertex AI Model Registry. Learn more about Model evaluation in Vertex AI.

Tutorial steps

  • Import a pretrained (blessed) model to the Vertex AI Model Registry.
  • Construct a custom model evaluation.
  • Import the model evaluation metrics to the corresponding model in the Vertex AI Model Registry.
  • List the model evaluation for the corresponding model in the Vertex AI Model Registry.
  • Construct a second custom model evaluation.
  • Import the second model evaluation metrics to the corresponding model in the Vertex AI Model Registry.
  • List the second model evaluation for the corresponding model in the Vertex AI Model Registry.
Colab
GitHub
Vertex AI Workbench
Vertex AI Model Monitoring for batch predictions
Vertex AI Batch Prediction with Model Monitoring.
Learn to use the Vertex AI Model Monitoring service to detect drift and anomalies in batch prediction. Learn more about Vertex AI Model Monitoring for batch predictions.

Tutorial steps

  • Upload a pretrained model as a Vertex AI Model resource.
  • Generate batch prediction requests.
  • Interpret the statistics, visualizations, other data reported by the model monitoring feature.
Colab
GitHub
Vertex AI Workbench
Vertex AI Model Monitoring
Vertex AI Model Monitoring for AutoML tabular models.
Learn to use the Vertex AI Model Monitoring service to detect feature skew and drift in the input predict requests, for AutoML tabular models. Learn more about Vertex AI Model Monitoring.

Tutorial steps

  • Train an AutoML model.
  • Deploy the Model resource to the Endpoint resource.
  • Configure the Endpoint resource for model monitoring.
  • Generate synthetic prediction requests for skew.
  • Generate synthetic prediction requests for drift.
  • Wait for email alert notification.
Colab
GitHub
Vertex AI Workbench
Vertex AI Model Monitoring
Vertex AI Model Monitoring for batch prediction in AutoML image models.
Learn how to use Vertex AI Model Monitoring with Vertex AI Batch Prediction with an AutoML image classification model to detect an out of distribution image. Learn more about Vertex AI Model Monitoring.

Tutorial steps

  • 1. Train an AutoML image classification model.
  • 2. Submit a batch prediction containing both in and out of distribution images.
  • 3. Use Model Monitoring to calculate anomaly score on each image.
  • 4. Identify the images in the batch prediction request that are out of distribution.
Colab
GitHub
Vertex AI Workbench
Vertex AI Model Monitoring
Vertex AI Model Monitoring for online prediction in AutoML image models.
Learn how to use Vertex AI Model Monitoring with Vertex AI Online Prediction with an AutoML image classification model to detect an out of distribution image. Learn more about Vertex AI Model Monitoring.

Tutorial steps

  • 1. Train an AutoML image classification model.
  • 2. Create an endpoint.
  • 3. Deploy the model to the endpoint, and configure for model monitoring.
  • 4. Submit a online prediction containing both in and out of distribution images.
  • 5. Use Model Monitoring to calculate anomaly score on each image.
  • 6. Identify the images in the online prediction request that are out of distribution.
Colab
GitHub
Vertex AI Workbench
Vertex AI Model Monitoring
Vertex AI Model Monitoring for custom tabular models.
Learn to use the Vertex AI Model Monitoring service to detect feature skew and drift in the input predict requests, for custom tabular models. Learn more about Vertex AI Model Monitoring.

Tutorial steps

  • Download a pretrained custom tabular model.
  • Upload the pretrained model as a Model resource.
  • Deploy the Model resource to the Endpoint resource.
  • Configure the Endpoint resource for model monitoring.
  • Generate synthetic prediction requests for skew.
  • Wait for email alert notification.
  • Generate synthetic prediction requests for drift.
  • Wait for email alert notification.
Colab
GitHub
Vertex AI Workbench
Vertex AI Model Monitoring
Vertex AI Model Monitoring for custom tabular models with TensorFlow Serving container.
Learn to use the Vertex AI Model Monitoring service to detect feature skew and drift in the input predict requests, for custom tabular models, using a custom deployment container. Learn more about Vertex AI Model Monitoring.

Tutorial steps

  • Download a pretrained custom tabular model.
  • Upload the pretrained model as a Model resource.
  • Deploying the Model resource to an Endpoint resource with TensorFlow Serving serving binary.
  • Configure the Endpoint resource for model monitoring.
  • Generate synthetic prediction requests for skew.
  • Wait for email alert notification.
  • Generate synthetic prediction requests for drift.
  • Wait for email alert notification.
Colab
GitHub
Vertex AI Workbench
Vertex AI Model Monitoring
Vertex AI Model Monitoring for setup for tabular models.
Learn to setup the Vertex AI Model Monitoring service to detect feature skew and drift in the input predict requests. Learn more about Vertex AI Model Monitoring.

Tutorial steps

  • Download a pretrained custom tabular model.
  • Upload the pretrained model as a Model resource.
  • Deploy the Model resource to the Endpoint resource.
  • Configure the Endpoint resource for model monitoring.
  • Skew and drift detection for feature inputs.
  • Skew and drift detection for feature attributions.
  • Automatic generation of the input schema by sending 1000 prediction request.
  • List, pause, resume and delete monitoring jobs.
  • Restart monitoring job with predefined input schema.
  • View logged monitored data.
Colab
GitHub
Vertex AI Workbench
Vertex AI Model Monitoring
Vertex AI Model Monitoring for XGBoost models.
Learn to use the Vertex AI Model Monitoring service to detect feature skew and drift in the input predict requests for XGBoost models. Learn more about Vertex AI Model Monitoring.

Tutorial steps

  • Download a pretrained XGBoost model.
  • Upload the pretrained model as a Model resource.
  • Deploy the Model resource to the Endpoint resource.
  • Configure the Endpoint resource for model monitoring
Colab
GitHub
Vertex AI Workbench
Vertex AI Model Monitoring
Vertex AI Model Monitoring with Explainable AI Feature Attributions.
Learn to use the Vertex AI Model Monitoring service to detect drift and anomalies in prediction requests from a deployed Vertex AI Model resource. Learn more about Vertex AI Model Monitoring.

Tutorial steps

  • Upload a pretrained model as a Vertex AI Model resource.
  • Create an Vertex AI Endpoint resource.
  • Deploy the Model resource to the Endpoint resource.
  • Configure the Endpoint resource for model monitoring.
  • Initialize the baseline distribution for model monitoring.
  • Generate synthetic prediction requests.
  • Understand how to interpret the statistics, visualizations, other data reported by the model monitoring feature.
Colab
GitHub
Vertex AI Workbench
Vertex AI Model Registry
Get started with Vertex AI Model Registry.
Learn how to use Vertex AI Model Registry to create and register multiple versions of a model. Learn more about Vertex AI Model Registry.

Tutorial steps

  • Create and register a first version of a model to Vertex AI Model Registry.
  • Create and register a second version of a model to Vertex AI Model Registry.
  • Updating the model version which is the default (blessed).
  • Deleting a model version.
  • Retraining the next model version.
Colab
GitHub
Vertex AI Workbench
Vertex AI Pipelines
AutoML components
Classification for tabular data
AutoML Tabular pipelines using google-cloud-pipeline-components.
Learn to use Vertex AI Pipelines and Google Cloud Pipeline Components to build an AutoML tabular classification model. Learn more about Vertex AI Pipelines. Learn more about AutoML components. Learn more about Classification for tabular data.

Tutorial steps

  • Create a KFP pipeline
Colab
GitHub
Vertex AI Workbench
Vertex AI Pipelines
Model evaluation in Vertex AI
Challenger vs Blessed methodology for model deployment into production.
Learn how to construct a Vertex AI pipeline, which trains a new challenger version of a model, evaluates the model and compares the evaluation to the existing blessed model in production, to determine whether the challenger model becomes the blessed model for replacement in production. Learn more about Vertex AI Pipelines. Learn more about Model evaluation in Vertex AI.

Tutorial steps

  • Import a pretrained (blessed) model to the Vertex AI Model Registry.
  • Import synthetic model evaluation metrics to the corresponding (blessed) model.
  • Create a Vertex AI Endpoint resource
  • Deploy the blessed model to the Endpoint resource.
  • Create a Vertex AI Pipeline
  • Get the blessed model.
  • Import another instance (challenger) of the pretrained model.
  • Register the pretrained (challenger) model as a new version of the existing blessed model.
  • Create a synthetic model evaluation.
  • Import the synthetic model evaluation metrics to the corresponding challenger model.
  • Compare the evaluations and set the blessed or challenger as the default.
  • Deploy the new blessed model.
Colab
GitHub
Vertex AI Workbench
Vertex AI Pipelines
Pipeline control structures using the KFP SDK.
Learn how to use the KFP SDK to build pipelines that use loops and conditionals, including nested examples. Learn more about Vertex AI Pipelines.

Tutorial steps

  • Create a KFP pipeline
Colab
GitHub
Vertex AI Workbench
Vertex AI Pipelines
Custom training components
Custom training with pre-built Google Cloud Pipeline Components.
Learn to use Vertex AI Pipelines and Google Cloud Pipeline Components to build a custom model. Learn more about Vertex AI Pipelines. Learn more about Custom training components.

Tutorial steps

  • Create a KFP pipeline
Colab
GitHub
Vertex AI Workbench
Vertex AI Pipelines
Vertex AI Batch Prediction components
Training and batch prediction with BigQuery source and destination for a custom tabular classification model.
In this tutorial, you train a scikit-learn tabular classification model and create batch prediction job for it through a Vertex AI pipeline using google_cloud_pipeline_components. Learn more about Vertex AI Pipelines. Learn more about Vertex AI Batch Prediction components.

Tutorial steps

  • Create a dataset in BigQuery.
  • Set some data aside from the source dataset for batch prediction.
  • Create a custom python package for training application.
  • Upload the python package to Cloud Storage.
  • Create a Vertex AI Pipeline that
Colab
GitHub
Vertex AI Workbench
Vertex AI Pipelines
Vertex AI Hyperparameter Tuning
Get started with Vertex AI Hyperparameter Tuning pipeline components.
Learn how to use prebuilt Google Cloud Pipeline Components for Vertex AI Hyperparameter Tuning. Learn more about Vertex AI Pipelines. Learn more about Vertex AI Hyperparameter Tuning.

Tutorial steps

  • Construct a pipeline for
Colab
GitHub
Vertex AI Workbench
Vertex AI Pipelines
Get started with machine management for Vertex AI Pipelines.
Learn how to convert a self-contained custom training component into a Vertex AI CustomJob, whereby:

Tutorial steps

  • Create a custom component with a selfcontained training job.
  • Execute pipeline using componentlevel settings for machine resources
  • Convert the selfcontained training component into a Vertex AI CustomJob.
  • Execute pipeline using customjoblevel settings for machine resources
Colab
GitHub
Vertex AI Workbench
Vertex AI Pipelines
AutoML components
AutoML image classification pipelines using google-cloud-pipeline-components.
Learn how to use Vertex AI Pipelines and Google Cloud Pipeline Components to build an AutoML image classification model. Learn more about Vertex AI Pipelines. Learn more about AutoML components.

Tutorial steps

  • Create a KFP pipeline
Colab
GitHub
Vertex AI Workbench
Vertex AI Pipelines
AutoML components
Regression for tabular data
AutoML tabular regression pipelines using google-cloud-pipeline-components.
Learn to use Vertex AI Pipelines and Google Cloud Pipeline Components to build an AutoML tabular regression model. Learn more about Vertex AI Pipelines. Learn more about AutoML components. Learn more about Regression for tabular data.

Tutorial steps

  • Create a KFP pipeline
Colab
GitHub
Vertex AI Workbench
Vertex AI Pipelines
AutoML components
AutoML text classification pipelines using google-cloud-pipeline-components.
Learn to use Vertex AI Pipelines and Google Cloud Pipeline Components to build an AutoML text classification model. Learn more about Vertex AI Pipelines. Learn more about AutoML components.

Tutorial steps

  • Create a KFP pipeline
Colab
GitHub
Vertex AI Workbench
Vertex AI Pipelines
BigQuery ML components
Training an acquisition-prediction model using Swivel, BigQuery ML and Vertex AI Pipelines.
Learn how to build a simple BigQuery ML pipeline using Vertex AI pipelines in order to calculate text embeddings of content from articles and classify them into the *corporate acquisitions* category. Learn more about Vertex AI Pipelines. Learn more about BigQuery ML components.

Tutorial steps

  • Creating a component for Dataflow job that ingests data to BigQuery.
  • Creating a component for preprocessing steps to run on the data in BigQuery.
  • Creating a component for training a logistic regression model using BigQuery ML.
  • Building and configuring a Kubeflow DSL pipeline with all the created components.
  • Compiling and running the pipeline in Vertex AI Pipelines.
Colab
GitHub
Vertex AI Workbench
Vertex AI Pipelines
Custom training components
Model train, upload, and deploy using Google Cloud Pipeline Components.
Learn how to use Vertex AI Pipelines and Google Cloud Pipeline Components to build and deploy a custom model. Learn more about Vertex AI Pipelines. Learn more about Custom training components.

Tutorial steps

  • Create a KFP pipeline
Colab
GitHub
Vertex AI Workbench
Vertex AI Pipelines
Vertex AI Model components
Model upload, predict, and evaluate using google-cloud-pipeline-components.
Learn how to evaluate a custom model using a pipeline with components from google_cloud_pipeline_components and a custom pipeline component you build. Learn more about Vertex AI Pipelines. Learn more about Vertex AI Model components.

Tutorial steps

  • Upload a pretrained model as a Model resource.
  • Run a BatchPredictionJob on the Model resource with ground truth data.
  • Generate evaluation Metrics artifact about the Model resource.
  • Compare the evaluation metrics to a threshold.
Colab
GitHub
Vertex AI Workbench
Vertex AI Pipelines
Vertex AI Pipelines with KFP 2.x.
Learn to use Vertex AI Pipelines and KFP 2.

Tutorial steps

  • Create a KFP pipeline
Colab
GitHub
Vertex AI Workbench
Vertex AI Pipelines
Lightweight Python function-based components, and component I/O.
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. Learn more about Vertex AI Pipelines.

Tutorial steps

  • Build Python functionbased 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
Colab
GitHub
Vertex AI Workbench
Vertex AI Pipelines
Metrics visualization and run comparison using the KFP SDK.
Learn how to use the KFP SDK to build pipelines that generate evaluation metrics. Learn more about Vertex AI Pipelines.

Tutorial steps

  • Create KFP components
Colab
GitHub
Vertex AI Workbench
Vertex AI Pipelines
Multicontender vs Champion methodology for model deployment into production.
Learn how to construct a Vertex AI pipeline, which evaluates new production data from a deployed model against other versions of the model, to determine if a contender model becomes the champion model for replacement in production.

Tutorial steps

  • Import a pretrained (champion) model to the Vertex AI Model Registry.
  • Import synthetic model training evaluation metrics to the corresponding (champion) model.
  • Create a Vertex AI Endpoint resource
  • Deploy the champion model to the Endpoint resource.
  • Import additional (contender) versions of the deployed model.
  • Import synthetic model training evaluation metrics to the corresponding (contender) models.
  • Create a Vertex AI Pipeline
  • Get the champion model.
  • (Fake) Finetune champion model with production data
  • Import synthetic train+production evaluation metrics for the champion model.
  • Get the contender models.
  • (Fake) Finetune contender model with production data
  • Import synthetic train+production evaluation metrics for the contenders modesl.
  • Compare the evaluations of the contenders to the champion and set the new champion as the default.
  • Deploy the new champion model.
Colab
GitHub
Vertex AI Workbench
Vertex AI Pipelines
Pipelines introduction for KFP.
Learn how to use the KFP SDK to build pipelines that generate evaluation metrics. Learn more about Vertex AI Pipelines.

Tutorial steps

  • Define and compile a Vertex AI pipeline.
  • Specify which service account to use for a pipeline run.
Colab
GitHub
Vertex AI Workbench
AutoML components
BigQuery ML components
BigQuery ML and AutoML - Experimenting with Vertex AI.
Learn how to use Vertex AI Predictions for rapid prototyping a model. Learn more about AutoML components. Learn more about BigQuery ML components.

Tutorial steps

  • Creating a BigQuery and Vertex AI training dataset.
  • Training a BigQuery ML and AutoML model.
  • Extracting evaluation metrics from the BigQueryML and AutoML models.
  • Selecting the best trained model.
  • Deploying the best trained model.
  • Testing the deployed model infrastructure.
Colab
GitHub
Vertex AI Workbench
Vertex AI Batch Prediction
Custom model batch prediction with feature filtering.
Learn how to create a custom-trained model from a Python script in a Docker container using the Vertex AI SDK for Python, and then run a batch prediction job by including or excluding a list of features. Learn more about Vertex AI Batch Prediction.

Tutorial steps

  • Create a Vertex AI custom TrainingPipeline for training a model.
  • Train a TensorFlow model.
  • Send batch prediction job.
Colab
GitHub
Vertex AI Workbench
Vertex AI Prediction
Get started with NVIDIA Triton server.
Learn how to deploy a container running Nvidia Triton Server with a Vertex AI Model resource to a Vertex AI Endpoint for making online predictions. Learn more about Vertex AI Prediction.

Tutorial steps

  • Download the model artifacts from TensorFlow Hub.
  • Create Triton serving configuration file for the model.
  • Construct a custom container, with Triton serving image, for model deployment.
  • Upload the model as a Vertex AI Model resource.
  • Deploy the Vertex AI Model resource to a Vertex AI Endpoint resource.
  • Make a prediction request
  • Undeploy the Model resource and delete the Endpoint
Colab
GitHub
Vertex AI Workbench
Raw Predict
Get started with TensorFlow serving functions with Vertex AI Raw Prediction.
Learn how to use Vertex AI Raw Prediction on a Vertex AI Endpoint resource. Learn more about Raw Predict.

Tutorial steps

  • Download pretrained tabular classification model artifacts for a TensorFlow 1.x estimator.
  • Upload the TensorFlow estimator model as a Vertex AI Model resource.
  • Create an Endpoint resource.
  • Deploy the Model resource to an Endpoint resource.
  • Make an online raw prediction to the Model resource instance deployed to the Endpoint resource.
Colab
GitHub
Vertex AI Workbench
Get predictions from a custom trained model
Get started with TensorFlow Serving with Vertex AI Prediction.
Learn how to use Vertex AI Prediction on a Vertex AI Endpoint resource with TensorFlow Serving serving binary. Learn more about Get predictions from a custom trained model.

Tutorial steps

  • Download a pretrained image classification model from TensorFlow Hub.
  • Create a serving function to receive compressed image data, and output decomopressed preprocessed data for the model input.
  • Upload the TensorFlow Hub model and serving function as a Vertex AI Model resource.
  • Creating an Endpoint resource.
  • Deploying the Model resource to an Endpoint resource with TensorFlow Serving serving binary.
  • Make an online prediction to the Model resource instance deployed to the Endpoint resource.
  • Make a batch prediction to the Model resource instance.
Colab
GitHub
Vertex AI Workbench
Private Endpoints
Get started with Vertex AI Private Endpoints.
Learn how to use Vertex AI Private Endpoint resources. Learn more about Private Endpoints.

Tutorial steps

  • Creating a Private Endpoint resource.
  • Configure a VPC peering connection.
  • Configuring the serving binary of a Model resource for deployment to a Private Endpoint resource.
  • Deploying a Model resource to a Private Endpoint resource.
  • Send a prediction request to a Private Endpoint
Colab
GitHub
Vertex AI Workbench
Vertex AI Language Models
Vertex AI LLM and streaming prediction.
Learn how to use Vertex AI LLM to download pretrained LLM model, make predictions and finetuning the model. Learn more about Vertex AI Language Models.

Tutorial steps

  • Load a pretrained text generation model.
  • Make a nonstreaming prediction
  • Load a pretrained text generation model, which supports streaming.
  • Make a streaming prediction
  • Load a pretrained chat model.
  • Do a local interactive chat session.
  • Do a batch prediction with a text generation model.
  • Do a batch prediction with a text embedding model.
Colab
GitHub
Vertex AI Workbench
Pre-built containers for prediction
Serving PyTorch image models with prebuilt containers on Vertex AI.
Learn how to package and deploy a PyTorch image classification model using a prebuilt Vertex AI container with TorchServe for serving online and batch predictions. Learn more about Pre-built containers for prediction.

Tutorial steps

  • Download a pretrained image model from PyTorch
  • Create a custom model handler
  • Package model artifacts in a model archive file
  • Upload model for deployment
  • Deploy model for prediction
  • Make online predictions
  • Make batch predictions
Colab
GitHub
Vertex AI Workbench
Vertex AI Prediction
Train and deploy PyTorch models with prebuilt containers on Vertex AI.
Learn how to build, train and deploy a PyTorch image classification model using prebuilt containers for custom training and prediction.

Tutorial steps

  • Package training application into a Python source distribution
  • Configure and run training job in a prebuilt container
  • Package model artifacts in a model archive file
  • Upload model for deployment
  • Deploy model using a prebuilt container for prediction
  • Make online predictions
Colab
GitHub
Vertex AI Workbench
Vertex AI Training
Vertex AI Reduction Server
PyTorch distributed training with Vertex AI Reduction Server.
Learn how to create a PyTorch distributed training job that uses PyTorch distributed training framework and tools, and run the training job on the Vertex AI Training service with Reduction Server. Learn more about Vertex AI Training. Learn more about Vertex AI Reduction Server.

Tutorial steps

  • Create a PyTorch distributed training application
  • Package the training application with prebuilt containers
  • Create a custom job on Vertex AI with Reduction Server
  • Submit and monitor the job
Colab
GitHub
Vertex AI Workbench
Classification for video data
AutoML Video Classification Example.
The objective of this notebook is to build a AutoML Video Classification Model. Learn more about Classification for video data.

Tutorial steps

  • Set your task name, and Cloud Storage prefix
  • Copy AutoML video demo train data for creating managed dataset
  • Create a dataset on Vertex AI.
  • Configure a training job
  • Launch a training job and create a model on Vertex AI
  • Copy AutoML Video Demo Prediction Data for creating batch prediction job
  • Perform batch prediction job on the model
Colab
GitHub
Vertex AI Workbench
Custom training
Custom training using Python package, managed text dataset, and TF Serving container.
Learn how to create a Custom Model using Custom Python Package Training and you learn how to serve the model using TensorFlow-Serving Container for online prediction. Learn more about Custom training.

Tutorial steps

  • Create utility functions to download data and prepare csv files for creating Vertex AI Managed Dataset
  • Download Data
  • Prepare CSV Files for Creating Managed Dataset
  • Create Custom Training Python Package
  • Create TensorFlow Serving Container
  • Run Custom Python Package Training with Managed Text Dataset
  • Deploy a Model and Create an Endpoint on Vertex AI
  • Predict on the Endpoint
  • Create a Batch Prediction Job on the Model
Colab
GitHub
Vertex AI Workbench
Tabular Workflow for TabNet
Vertex AI Explanations with TabNet models.
Learn how to provide a sample plotting tool to visualize the output of TabNet, which is helpful in explaining the algorithm. Learn more about Tabular Workflow for TabNet.

Tutorial steps

  • Setup the project.
  • Download the prediction data of pretrain model onf Syn2 data.
  • Visualize and understand the feature importance based on the masks output.
  • Clean up the resource created by this tutorial.
Colab
GitHub
Vertex AI Workbench
Tabular Workflow for TabNet
Get started with TabNet builtin algorithm for training tabular models.
Learn how to run Vertex AI TabNet built algorithm for training custom tabular models. Learn more about Tabular Workflow for TabNet.

Tutorial steps

  • Get the training data.
  • Configure training parameters for the Vertex AI TabNet container.
  • Train the model using Vertex AI Training using CSV data.
  • Upload the model as a Vertex AI Model resource.
  • Deploy the Vertex AI Model resource to a Vertex AI Endpoint resource.
  • Make a prediction with the deployed model.
  • Hyperparameter tuning the Vertex AI TabNet model.
Colab
GitHub
Vertex AI Workbench
Tabular Workflow for TabNet
Vertex AI TabNet.
Learn how to run TabNet model on Vertex AI. Learn more about Tabular Workflow for TabNet.

Tutorial steps

  • 1. Setup
Colab
GitHub
Vertex AI Workbench
Google Cloud Pipeline Components
Prophet for tabular data
Train a Prophet Model using Vertex AI Tabular Workflows.
Learn how to create several Prophet models using a training Vertex AI Pipeline from Google Cloud Pipeline Components , and then do a batch prediction using the corresponding prediction pipeline. Learn more about Google Cloud Pipeline Components. Learn more about Prophet for tabular data.

Tutorial steps

  • 1. Train the Prophet models.
  • 1. View the evaluation metrics.
  • 1. Make a batch prediction with the Prophet models.
Colab
GitHub
Vertex AI Workbench
Tabular Workflow for TabNet
TabNet Pipeline.
Learn how to create classification models on tabular data using two of the Vertex AI TabNet Tabular Workflows. Learn more about Tabular Workflow for TabNet.

Tutorial steps

  • Create a TabNet CustomJob. This is the best option if you know which hyperparameters to use for training.
  • Create a TabNet HyperparameterTuningJob. This allows you to get the best set of hyperparameters for your dataset.
Colab
GitHub
Vertex AI Workbench
Tabular Workflow for Wide & Deep
Wide & Deep Pipeline.
Learn how to create two classification models using Vertex AI Wide & Deep Tabular Workflows. Learn more about Tabular Workflow for Wide & Deep.

Tutorial steps

  • Create a Wide & Deep CustomJob. This is the best option if you know which hyperparameters to use for training.
  • Create a Wide & Deep HyperparameterTuningJob. This allows you to get the best set of hyperparameters for your dataset.
Colab
GitHub
Vertex AI Workbench
Vertex AI TensorBoard
Custom training
Vertex AI TensorBoard Custom Training with custom container.
Learn how to create a custom training job using custom containers, and monitor your training process on Vertex AI TensorBoard in near real time. Learn more about Vertex AI TensorBoard. Learn more about Custom training.

Tutorial steps

  • Create docker repository & config.
  • Create a custom container image with your customized training code.
  • Setup service account and Google Cloud Storage buckets.
  • Create & launch your custom training job with your custom container.
Colab
GitHub
Vertex AI Workbench
Vertex AI TensorBoard
Custom training
Vertex AI TensorBoard custom training with prebuilt container.
Learn how to create a custom training job using prebuilt containers, and monitor your training process on Vertex AI TensorBoard in near real time. Learn more about Vertex AI TensorBoard. Learn more about Custom training.

Tutorial steps

  • Setup service account and Google Cloud Storage buckets.
  • Write your customized training code.
  • Package and upload your training code to Google Cloud Storage.
  • Create & launch your custom training job with Vertex AI TensorBoard enabled for near real time monitorning.
Colab
GitHub
Vertex AI Workbench
Vertex AI TensorBoard
Vertex AI TensorBoard Hyperparameter Tuning with the HParams Dashboard.
This tutorial shows you how to log hyperparameter experiment results in TensorFlow and visualize the results in Vertex AI TensorBoard's Hparams dashboard. Learn more about Vertex AI TensorBoard.

Tutorial steps

  • Adapt TensorFlow runs to log hyperparameters and metrics.
  • Start runs and log them all under one parent directory.
  • Visualize the results in Vertex AI TensorBoard's HParams dashboard.
Colab
GitHub
Vertex AI Workbench
Vertex AI TensorBoard Profiler
Profile model training performance using Vertex AI TensorBoard Profiler.
Learn how to enable Vertex AI TensorBoard Profiler for custom training jobs. Learn more about Vertex AI TensorBoard Profiler.

Tutorial steps

  • Setup a service account and a Cloud Storage bucket
  • Create a Vertex AI TensorBoard instance
  • Create and run a custom training job that enables Vertex AI TensorBoard Profiler
  • View the Vertex AI TensorBoard Profiler dashboard to debug your model training performance
Colab
GitHub
Vertex AI Workbench
Vertex AI TensorBoard Profiler
Profile model training performance using Vertex AI TensorBoard Profiler in custom training with prebuilt container.
Learn how to enable the Vertex AI TensorBoard Profiler in Vertex AI for custom training jobs with a prebuilt container. Learn more about Vertex AI TensorBoard Profiler.

Tutorial steps

  • Prepare your custom training code and load your training code as a Python package to a prebuilt container
  • Create and run a custom training job that enables the Vertex AI TensorBoard Profiler
  • View the Vertex AI TensorBoard Profiler dashboard to debug your model training performance
Colab
GitHub
Vertex AI Workbench
Vertex AI TensorBoard
Vertex AI Pipelines
Vertex AI TensorBoard integration with Vertex AI Pipelines.
Learn how to create a training pipeline using the KFP SDK, execute the pipeline in Vertex AI Pipelines, and monitor your training process on Vertex AI TensorBoard in near real time. Learn more about Vertex AI TensorBoard. Learn more about Vertex AI Pipelines.

Tutorial steps

  • Setup a service account and Google Cloud Storage buckets.
  • Construct a KFP pipeline with your custom training code.
  • Compile and execute the KFP pipeline in Vertex AI Pipelines with Vertex AI TensorBoard enabled for near real time monitorning.
Colab
GitHub
Vertex AI Workbench
Vertex AI Hyperparameter Tuning
Distributed Vertex AI Hyperparameter Tuning.
In this notebook, you create a custom trained model from a Python script in a Docker container. Learn more about Vertex AI Hyperparameter Tuning.

Tutorial steps

  • Training using a Python package.
  • Report accuracy when hyperparameter tuning.
  • Save the model artifacts to Cloud Storage using Cloud StorageFuse.
Colab
GitHub
Vertex AI Workbench
Custom training
Get started with Vertex AI Training for LightGBM.
Learn how to use Vertex AI Training for training a LightGBM custom model. Learn more about Custom training.

Tutorial steps

  • Training using a Python package.
  • Save the model artifacts to Cloud Storage using Cloud StorageFuse.
  • Construct a FastAPI prediction server.
  • Construct a Dockerfile deployment image.
  • Test the deployment image locally.
  • Create a Vertex AI Model resource.
Colab
GitHub
Vertex AI Workbench
Vertex AI Distributed Training
Get started with Vertex AI Distributed Training.
Learn how to use Vertex AI Distributed Training when training with Vertex AI. Learn more about Vertex AI Distributed Training.

Tutorial steps

  • MirroredStrategy
Colab
GitHub
Vertex AI Workbench
Vertex AI Hyperparameter Tuning
Run hyperparameter tuning for a TensorFlow model.
Learn how to run a Vertex AI Hyperparameter Tuning job for a TensorFlow model. Learn more about Vertex AI Hyperparameter Tuning.

Tutorial steps

  • Modify training application code for automated hyperparameter tuning.
  • Containerize training application code.
  • Configure and launch a hyperparameter tuning job with the Vertex AI Python SDK.
Colab
GitHub
Vertex AI Workbench
Vertex AI Hyperparameter Tuning
Vertex AI Hyperparameter Tuning for XGBoost.
Learn how to use Vertex AI Hyperparameter Tuning for training a XGBoost custom model. Learn more about Vertex AI Hyperparameter Tuning.

Tutorial steps

  • Training using a Python package.
  • Report accuracy when hyperparameter tuning.
  • Save the model artifacts to Cloud Storage using Cloud StorageFuse.
  • Create a Vertex AI Model resource.
Colab
GitHub
Vertex AI Workbench
Vertex AI Training
PyTorch image classification multi-node distributed data parallel training on cpu using Vertex training with custom container.
Learn how to create a distributed PyTorch training job using Vertex AI SDK for Python and custom containers. Learn more about Vertex AI Training.

Tutorial steps

  • Setting up your Google Cloud project
Colab
GitHub
Vertex AI Workbench
Vertex AI Training
PyTorch image classification multi-node NCCL distributed data parallel training on cpu using Vertex training with custom container.
Learn how to create a distributed PyTorch training job using Vertex AI SDK for Python and custom containers. Learn more about Vertex AI Training.

Tutorial steps

  • Building Custom Container using Artifact Registry and Docker
  • Create a Vertex AI tensorboard instance to store your Vertex AI experiment
  • Run a Vertex AI SDK CustomContainerTrainingJob
Colab
GitHub
Vertex AI Workbench
Custom training
Training, tuning and deploying a PyTorch text sentiment classification model on Vertex AI.
Learn to build, train, tune and deploy a PyTorch model on Vertex AI. Learn more about Custom training.

Tutorial steps

  • Create training package for the text classification model.
  • Train the model with custom training on Vertex AI.
  • Check the created model artifacts.
  • Create a custom container for predictions.
  • Deploy the trained model to a Vertex AI Endpoint using the custom container for predictions.
  • Send online prediction requests to the deployed model and validate.
  • Clean up the resources created in this notebook.
Colab
GitHub
Vertex AI Workbench
PyTorch integration in Vertex AI
Train PyTorch model on Vertex AI with data from Cloud Storage.
Learn how to create a training job using PyTorch and a dataset stored on Cloud Storage. Learn more about PyTorch integration in Vertex AI.

Tutorial steps

  • Write a custom training script that creates your train & test datasets and trains the model.
  • Run a Vertex AI SDK CustomTrainingJob
Colab
GitHub
Vertex AI Workbench
Distributed training
Using PyTorch torchrun to simplify multi-node training with custom containers.
In this tutorial, you will learn how to train an Imagenet model using PyTorch's Torchrun on multiple nodes. Learn more about Distributed training.

Tutorial steps

  • Create a shell script to start an ETCD cluster on the master node
  • Create a training script using code from PyTorch Elastic's GitHub repository
  • Create containers that download the data, and start an ETCD cluster on the host
  • Train the model using multiple nodes with GPUs
Colab
GitHub
Vertex AI Workbench
Custom training
Distributed XGBoost training with Dask.
Learn how to create a distributed training job using XGBoost with Dask. Learn more about Custom training.

Tutorial steps

  • Configure the PROJECT_ID and REGION variables for your Google Cloud project.
  • Create a Cloud Storage bucket to store your model artifacts.
  • Build a custom Docker container that hosts your training code and push the container image to Artifact Registry.
  • Run a Vertex AI SDK CustomContainerTrainingJob
Colab
GitHub
Vertex AI Workbench
Vertex AI Vizier
Optimizing multiple objectives with Vertex AI Vizier.
Learn how to use Vertex AI Vizier to optimize a multi-objective study. Learn more about Vertex AI Vizier.

Tutorial steps

Colab
GitHub
Vertex AI Workbench
Vertex AI Vizier
Get started with Vertex AI Vizier.
Learn how to use Vertex AI Vizier for when training with Vertex AI. Learn more about Vertex AI Vizier.

Tutorial steps

  • Hyperparameter tuning with Random algorithm.
  • Hyperparameter tuning with Vizier (Bayesian) algorithm.
  • Suggesting trials and updating results for Vizier study
Colab
GitHub
Vertex AI Workbench
Vertex AI Workbench
Vertex AI Training
Train a multi-class classification model for ads-targeting.
Learn how to collect data from BigQuery, preprocess it, and train a multi-class classification model on an e-commerce dataset. Learn more about Vertex AI Workbench. Learn more about Vertex AI Training.

Tutorial steps

  • Fetch the required data from BigQuery
  • Preprocess the data
  • Train a TensorFlow (>=2.4) classification model
  • Evaluate the loss for the trained model
  • Automate the notebook execution using the executor feature
  • Save the model to a Cloud Storage path
  • Clean up the created resources
Colab
GitHub
Vertex AI Workbench
Vertex AI Workbench
Vertex Explainable AI
Taxi fare prediction using the Chicago Taxi Trips dataset.
The goal of this notebook is to provide an overview on the latest Vertex AI features like **Explainable AI** and **BigQuery in Notebooks** by trying to solve a taxi fare prediction problem. Learn more about Vertex AI Workbench. Learn more about Vertex Explainable AI.

Tutorial steps

  • Loading the dataset using "BigQuery in Notebooks".
  • Performing exploratory data analysis on the dataset.
  • Feature selection and preprocessing.
  • Building a linear regression model using scikitlearn.
  • Configuring the model for Vertex Explainable AI.
  • Deploying the model to Vertex AI.
  • Testing the deployed model.
  • Clean up.
Colab
GitHub
Vertex AI Workbench
Vertex AI Workbench
BigQuery ML
Forecasting retail demand with Vertex AI and BigQuery ML.
Learn how to build ARIMA (Autoregressive integrated moving average) model from BigQuery ML on retail data Learn more about Vertex AI Workbench. Learn more about BigQuery ML.

Tutorial steps

  • Explore data
  • Model with BigQuery and the ARIMA model
  • Evaluate the model
  • Evaluate the model results using BigQuery ML (on training data)
  • Evaluate the model results MAE, MAPE, MSE, RMSE (on test data)
  • Use the executor feature
Colab
GitHub
Vertex AI Workbench
Vertex AI Workbench
BigQuery ML
Interactive exploratory analysis of BigQuery data in a notebook.
Learn about various ways to explore and gain insights from BigQuery data in a Jupyter notebook environment. Learn more about Vertex AI Workbench. Learn more about BigQuery ML.

Tutorial steps

  • Using Python & SQL to query public data in BigQuery
  • Exploring the dataset using BigQuery INFORMATION_SCHEMA
  • Creating interactive elements to help explore interesting parts of the data
  • Doing some exploratory correlation and time series analysis
  • Creating static and interactive outputs (data tables and plots) in the notebook
  • Saving some outputs to Cloud Storage
Colab
GitHub
Vertex AI Workbench
Vertex AI Workbench
Custom training
Build a fraud detection model on Vertex AI.
This tutorial demonstrates data analysis and model-building using a synthetic financial dataset. Learn more about Vertex AI Workbench. Learn more about Custom training.

Tutorial steps

  • Installation of required libraries
  • Reading the dataset from a Cloud Storage bucket
  • Performing exploratory analysis on the dataset
  • Preprocessing the dataset
  • Training a random forest model using scikitlearn
  • Saving the model to a Cloud Storage bucket
  • Creating a Vertex AI model resource and deploying to an endpoint
  • Running the WhatIf Tool on test data
  • Undeploying the model and cleaning up the model resources
Colab
GitHub
Vertex AI Workbench
Vertex AI Workbench
BigQuery ML
Churn prediction for game developers using Google Analytics 4 and BigQuery ML.
Learn how to train, evaluate a propensity model in BigQuery ML. Learn more about Vertex AI Workbench. Learn more about BigQuery ML.

Tutorial steps

  • Explore an export of Google Analytics 4 data on BigQuery.
  • Prepare the training data using demographic, behavioral data, and labels (churn/notchurn).
  • Train an XGBoost model using BigQuery ML.
  • Evaluate a model using BigQuery ML.
  • Make predictions on which users will churn using BigQuery ML.
Colab
GitHub
Vertex AI Workbench
Vertex AI Workbench
Inventory prediction on ecommerce data using Vertex AI.
This tutorial shows you how to do exploratory data analysis, preprocess data, train model, evaluate model, deploy model, configure What-If Tool.

Tutorial steps

  • Load the dataset from BigQuery using the "BigQuery in Notebooks" integration.
  • Analyze the dataset.
  • Preprocess the features in the dataset.
  • Build a random forest classifier model that predicts whether a product will get sold in the next 60 days.
  • Evaluate the model.
  • Deploy the model using Vertex AI.
  • Configure and test with the WhatIf Tool.
Colab
GitHub
Vertex AI Workbench
Vertex AI Workbench
Vertex AI Training
Predictive Maintenance using Vertex AI.
Learn how to the executor feature of Vertex AI Workbench to automate a workflow to train and deploy a model. Learn more about Vertex AI Workbench. Learn more about Vertex AI Training.

Tutorial steps

  • Loading the required dataset from a Cloud Storage bucket.
  • Analyzing the fields present in the dataset.
  • Selecting the required data for the predictive maintenance model.
  • Training an XGBoost regression model for predicting the remaining useful life.
  • Evaluating the model.
  • Running the notebook endtoend as a training job using Executor.
  • Deploying the model on Vertex AI.
  • Clean up.
Colab
GitHub
Vertex AI Workbench
Vertex AI Workbench
BigQuery ML
Analysis of pricing optimization on CDM Pricing Data.
The objective of this notebook is to build a pricing optimization model using BigQuery ML. Learn more about Vertex AI Workbench. Learn more about BigQuery ML.

Tutorial steps

  • Load the required dataset from a Cloud Storage bucket.
  • Analyze the fields present in the dataset.
  • Process the data to build a model.
  • Build a BigQuery ML forecast model on the processed data.
  • Get forecasted values from the BigQuery ML model.
  • Interpret the forecasts to identify the best prices.
  • Clean up.
Colab
GitHub
Vertex AI Workbench
Vertex AI Workbench
Sentiment analysis for text data
Sentiment Analysis using AutoML Natural Language and Vertex AI.
Learn how to train and deploy an AutoML sentiment analysis model, and make predictions. Learn more about Vertex AI Workbench. Learn more about Sentiment analysis for text data.

Tutorial steps

  • Loading the required data.
  • Preprocessing the data.
  • Selecting the required data for the model.
  • Loading the dataset into Vertex AI managed datasets.
  • Training a sentiment model using AutoML Text training.
  • Evaluating the model.
  • Deploying the model on Vertex AI.
  • Getting predictions.
  • Clean up.
Colab
GitHub
Vertex AI Workbench
Vertex AI Workbench
Dataproc Serverless for Spark
Digest and analyze data from BigQuery with Dataproc.
This notebook tutorial runs an Apache Spark job that fetches data from the BigQuery "GitHub Activity Data" dataset, queries the data, and then writes the results back to BigQuery. Learn more about Vertex AI Workbench. Learn more about Dataproc Serverless for Spark.

Tutorial steps

  • Setting up a Google Cloud project and Dataproc cluster.
  • Configuring the sparkbigqueryconnector.
  • Ingesting data from BigQuery into a Spark DataFrame.
  • Preprocessing ingested data.
  • Querying the most frequently used programming language in monoglot repos.
  • Querying the average size (MB) of code in each language stored in monoglot repos.
  • Querying the languages files most frequently found together in polyglot repos.
  • Writing the query results back into BigQuery.
  • Deleting the resources created for this notebook tutorial.
Colab
GitHub
Vertex AI Workbench
Vertex AI Workbench
Dataproc
SparkML with Dataproc and BigQuery.
This tutorial runs an Apache SparkML job that fetches data from the BigQuery dataset, performs exploratory data analysis, cleans the data, executes feature engineering, trains the model, evaluates the model, outputs results, and saves the model to a Cloud Storage bucket. Learn more about Vertex AI Workbench. Learn more about Dataproc.

Tutorial steps

  • Sets up a Google Cloud project and Dataproc cluster.
  • Creates a Cloud Storage bucket and a BigQuery dataset.
  • Configures the sparkbigqueryconnector.
  • Ingests BigQuery data into a Spark DataFrame.
  • Performa Exploratory Data Analysis (EDA).
  • Visualizes the data with samples.
  • Cleans the data.
  • Selects features.
  • Trains the model.
  • Outputs results.
  • Saves the model to a Cloud Storage bucket.
  • Deletes the resources created for the tutorial.
Colab
GitHub
Vertex AI Workbench