How do you build and deploy a machine learning model without becoming an expert programmer or managing a room full of servers? That is the exact problem Vertex AI on Google Cloud solves, and it is a core topic you must master for the Google Professional Data Engineer (PDE) exam. This platform gives you a single place to take raw data, turn it into a trained model—either by letting Google do most of the work with AutoML or by writing your own code—and then put that model to work in the real world.
Jump to a section
A simple way to picture Machine Learning on GCP with Vertex AI
You decide to throw a big dinner party, so you hire a personal chef. First, you tell the chef your favourite cuisines and any dietary restrictions, which sets the direction. This leads to the chef either using a pre-designed recipe book (AutoML) or writing a brand-new recipe from scratch (custom training).
If you use the recipe book approach, you flip through pages of pre-tested recipes for things like 'tomato sauce' or 'chocolate cake'. The chef knows these recipes work, but they might need a tiny tweak—like swapping regular flour for gluten-free—to match your needs perfectly. That is AutoML on Vertex AI: you bring your labelled data (your list of ingredients and tastes), and the platform automatically tries many pre-built recipe structures (models) to find one that fits your specific goal, like predicting which guests will love a spicy dish.
If you want something completely new—say, an insect-based protein canapé—the chef must create the recipe from scratch. They decide the exact cooking temperature, the order of mixing, and the precise quantity of each ingredient. This is custom training: you write the entire machine learning model yourself, including the algorithm and the training process. Vertex AI gives you the kitchen, the ovens, and the storage for your ingredients, so you don't need to build a kitchen from scratch. The platform manages the heavy lifting of computing power and data storage, letting you focus on the recipe. Either way, the chef serves the final dishes (your model) to your guests (users), and the kitchen (Vertex AI) cleans up and tracks everything.
Machine learning (ML) is a way for computers to learn patterns from data without being explicitly programmed with rules for every situation. For example, instead of writing code that says 'if the email contains the word 'lottery', mark it as spam', you show the computer thousands of examples of spam and non-spam emails, and it learns the patterns itself. Vertex AI is a Google Cloud service that provides a complete environment to do this at scale, from start to finish. It is a single platform that replaces a messy collection of separate tools.
Before Vertex AI, a data engineer might have used Google's 'AI Platform' for training, then Cloud Storage for data, then Kubernetes for serving the model—each with different interfaces and configurations. Vertex AI unifies these into one product. This matters for the PDE exam because you will be asked how to design a pipeline that is efficient, scalable, and easy to maintain.
Vertex AI has two main paths for building a model: AutoML and custom training. AutoML stands for 'Automated Machine Learning'. It is designed for people who have labelled data (data where the answer is already known, like images tagged 'cat' or 'dog') but do not have deep expertise in writing ML code. You upload your data to Vertex AI, tell it what you want to predict (for instance, 'is this transaction fraudulent?'), and the service automatically tries many different model architectures and settings to find the one that performs best. It handles feature engineering (transforming raw data into useful inputs for the model) and hyperparameter tuning (adjusting the knobs that control how a model learns) for you. This is excellent for common tasks like image classification, text sentiment analysis, or predicting numerical values from a table of data.
Custom training, on the other hand, is for when you need full control. You write your own ML code, usually in Python using frameworks like TensorFlow or PyTorch. You define every part of the model: the layers of the neural network, the learning rate, the training loop. Vertex AI then provides the computing power (GPUs or TPUs—specialised processors for ML) to run your code. You also manage the training job yourself, setting up the environment and monitoring progress. This is necessary for unique problems that off-the-shelf models cannot handle, such as a novel type of data or a research project.
Once you have a trained model (from either path), you need to deploy it so applications can use it to make predictions. Vertex AI allows you to deploy the model to an endpoint, which is essentially a web address that other services can call. When a user sends a new data point (like a new email), the endpoint returns a prediction (like 'spam' or 'not spam'). Vertex AI handles the scaling: if 10 people use it per minute or 10,000, the infrastructure adjusts automatically. It also provides model monitoring, alerting you if the model's predictions start to become inaccurate over time (a problem called 'model drift').
A critical feature for the PDE exam is Vertex AI Pipelines. This lets you define your entire ML workflow—from data ingestion, to training, to evaluation, to deployment—as a series of automated steps. You can use tools like Kubeflow Pipelines or TensorFlow Extended (TFX) to create these pipelines. They run automatically, so if new data arrives, the pipeline can retrain the model without human intervention. This is called MLOps (machine learning operations), and it is a key concept for the exam.
Finally, Vertex AI integrates tightly with other Google Cloud services. For example, you can pull data from BigQuery (a data warehouse), store models in Cloud Storage, and use Cloud Logging and Cloud Monitoring to track everything. The exam will test your ability to choose the right service for each part of the pipeline and to design a system that is secure, cost-effective, and reliable.
Prepare and Load Data
Gather your data into a format Vertex AI can use, such as a CSV file in Cloud Storage or a BigQuery table. Clean the data by handling missing values and splitting it into training and testing sets. This step sets the foundation for a reliable model.
Define the Objective
Choose your machine learning problem: classification (e.g., spam or not spam), regression (predicting a number), or another type like clustering. This determines the metric you will optimise, such as accuracy or mean squared error.
Create a Training Job
In Vertex AI, you select either AutoML (no code required) or custom training (write your own Python code). For AutoML, you simply point to your data and select the target column. For custom, you package your code in a Docker container and submit it to the service.
Train and Evaluate the Model
Vertex AI runs the training job on scalable infrastructure, then automatically evaluates the model on the testing data. You review key performance metrics to decide if the model is good enough. You can use Vertex AI Experiments to track multiple runs and compare results.
Deploy the Model
Deploy the model to an endpoint for real-time predictions or set up a batch prediction job. For endpoints, you configure scaling and traffic splitting between multiple model versions. The Vertex AI Model Registry helps you manage versions and roll back if necessary.
Monitor and Iterate
Use Vertex AI Model Monitoring to watch for data drift and concept drift. Create an automated pipeline that retrains the model on new data and redeploys it only if the new version outperforms the current one. This completes the MLOps cycle.
Consider a medium-sized e-commerce company, 'ShopAll', that wants to improve its product recommendations. Currently, they show popular items to all users, but they know that personalising recommendations could increase sales by 15%. The company has a data engineer named Priya, and she decides to use Vertex AI.
First, Priya gathers the data: purchase history, browsing behaviour, and product attributes for the past year. This data sits in BigQuery. She needs to label it for training. Since this is a recommendation problem, she uses a technique called collaborative filtering: the 'label' is whether a user bought a product after viewing it. She exports a sample of this data to a CSV file.
Next, she opens Vertex AI in the Google Cloud Console. She has no time to build a custom model from scratch for this first version, so she chooses AutoML Tables. This is the part of AutoML designed for structured, tabular data (like spreadsheets). She uploads the CSV file and tells Vertex AI the target column is 'purchased' (yes or no). The platform automatically splits the data into training and testing sets, then tries dozens of models using techniques like gradient-boosted trees and neural networks. After a few hours, it identifies the best performing one. Priya reviews the model's key metrics—like precision (how many of the recommended items were actually purchased) and recall (how many of the actual purchases were captured by the recommendations)—and confirms the model is good enough.
Priya then deploys this model to an endpoint. She configures the endpoint to automatically scale based on traffic and sets up monitoring to track how many requests it receives and how long predictions take. She also creates a Vertex AI Pipeline that runs every week: it pulls new purchase data from BigQuery, retrains the AutoML model, compares it to the current deployed model, and only replaces the old model if the new one performs better.
After a month, Priya notices that the model's accuracy is dropping slightly. She looks at the Vertex AI Model Monitoring dashboard, which shows that the distribution of products being viewed has shifted (a summer sale has ended, and winter items are now popular). This is data drift. The pipeline automatically triggers a retraining with the most recent data.
What does Priya actually do day-to-day? She writes configuration files (YAML) for her pipelines, sets up Cloud Scheduler to trigger them weekly, and uses Cloud Logging to debug any failures. She rarely touches the ML code itself because AutoML handles that. The key skill here is designing the automation and monitoring—the 'MLOps' part—rather than building the model. - She sets up BigQuery as the source for training data. - She configures AutoML Tables from the Vertex AI console or via the API. - She defines the pipeline steps using the Vertex AI Pipelines SDK. - She uses Cloud IAM to control who can deploy models to production. - She creates alerts in Cloud Monitoring if endpoint latency exceeds 200 milliseconds.
The PDE exam tests your ability to design and implement ML models and pipelines using Vertex AI, which is a large and focused topic. Here is exactly what you need to know.
First, understand the distinction between AutoML and custom training. The exam will give you a scenario describing a team's skills and the problem complexity. If the team has limited ML expertise and a common problem (e.g., image classification or tabular prediction), the answer is usually AutoML. If the problem is novel, or the team has deep knowledge and needs fine-grained control, the answer is custom training. A trap: they often describe a problem that could work with AutoML but add a requirement like 'using a custom neural architecture' — that forces you to choose custom training.
Second, you must know the components of a Vertex AI pipeline. The exam uses the term 'pipeline' frequently. Key concepts are:\ - 'Components': individual steps in a pipeline (e.g., data validation, training, evaluation).\ - 'Graph': the ordered sequence of components.\ - 'Artifacts': inputs and outputs of components (e.g., a dataset, a model).\ - 'Metadata store': tracks every artifact and execution, enabling reproducibility.\
You will see questions like 'Which Vertex AI service should a data engineer use to automate model retraining?' The answer is 'Vertex AI Pipelines' or 'Vertex AI Workbench' for a slightly different use case. Another common question: 'What tool can be used to define the pipeline graph?' The answer is 'Kubeflow Pipelines SDK' or 'TFX' (TensorFlow Extended). Know that both are supported.
Third, the exam tests model deployment strategies. They love:\ - 'Endpoint': a real-time prediction service that autoscales.\ - 'Batch prediction': for processing many predictions at once, cheaper and uses less infrastructure overhead.\ - 'Model monitoring': you must know the difference between 'data drift' (input data changes) and 'concept drift' (the relationship between input and target changes). A typical question: 'Your model's accuracy drops, but the input data distribution looks the same. What is the likely cause?' Answer: 'Concept drift.'
Fourth, integration with other GCP services is crucial. You must know that:\ - Training data can come from BigQuery, Cloud Storage, or even from an external source via the Vertex AI Data Connector.\ - Models are stored in Cloud Storage.\ - Predictions can be logged to Cloud Logging for audit.\ - IAM roles like 'aiplatform.user' control permissions.
Fifth, a frequent trap is time-limited or one-time training. The exam might ask: 'Which Vertex AI feature allows you to track experiments and compare results?' The answer is 'Vertex AI Experiments', not 'Pipelines'. Experiments are for tracking different training runs, while Pipelines are for production workflows.
Finally, memorise the key managed services:\ - Vertex AI Workbench (for notebooks, like JupyterLab).\ - Vertex AI Prediction (for serving models).\ - Vertex AI Model Registry (a central place to manage model versions).\ - Vertex AI Feature Store (for storing and serving features to multiple models).
Vertex AI is a unified platform that manages the entire machine learning lifecycle, from data preparation to model deployment and monitoring.
AutoML automatically searches for the best model architecture and hyperparameters, requiring zero ML coding from the user.
Custom training gives you full control over the ML code and infrastructure, ideal for novel problems or specialised research.
Vertex AI Pipelines automate multi-step ML workflows, enabling retraining and redeployment without manual intervention.
Model monitoring in Vertex AI detects data drift and concept drift, alerting you when prediction accuracy likely decreases over time.
Batch prediction is a cost-effective alternative to real-time endpoints for processing large datasets in bulk.
The Vertex AI Model Registry provides a central hub to manage, version, and deploy different model iterations.
Vertex AI integrates with core GCP services such as BigQuery, Cloud Storage, and Cloud Logging for a seamless data pipeline.
On the PDE exam, distinguish between AutoML (for standard problems with labelled data) and custom training (when you need to engineer your own algorithm).
Pipelines are for production automation; Experiments are for comparing individual training runs during development.
These come up on the exam all the time. Here's how to tell them apart.
AutoML
Requires no coding or ML expertise to start.
Automatically tries many model architectures and picks the best.
Best for standard problems like image classification or tabular prediction.
Custom Training
Requires writing Python code and understanding ML frameworks.
You design every aspect of the model (layers, hyperparameters).
Best for novel problems or when you need fine-grained control.
Vertex AI Pipelines
Automates a production workflow (e.g., train, evaluate, deploy).
Designed for repeatable, scheduled runs with no manual steps.
Output is a deployed model or an artifact for further use.
Vertex AI Experiments
Tracks and compares individual training runs.
Used during development to find the best hyperparameter values.
Output is a set of metrics and logs for comparison.
Real-time Prediction (Endpoint)
Provides predictions for single requests with low latency.
Always on and auto-scales based on traffic.
Ideal for interactive applications like a recommendation API.
Batch Prediction
Processes a large file of inputs all at once.
Runs as a job and does not require a live endpoint.
Ideal for periodic offline tasks like monthly churn analysis.
Data Drift
The statistical distribution of input features changes over time.
Example: After a holiday, users search for different products.
Model monitoring detects this by comparing recent data to training data.
Concept Drift
The relationship between input features and the target changes.
Example: A credit model's old relationship no longer applies due to new economic conditions.
Detectable only by monitoring prediction accuracy or model performance metrics.
Mistake
AutoML always produces a worse model than custom training.
Correct
AutoML can often outperform a custom model built by a non-expert because it automatically searches through many architectures and hyperparameters. For standard problems, AutoML is a strong competitor to custom models.
Beginners assume that a human-crafted solution is inherently better, but AutoML leverages extensive pre-computed knowledge and trial runs that a single person cannot match.
Mistake
You must write Python code to use Vertex AI at all.
Correct
Vertex AI offers a fully managed AutoML service that requires no code. You can upload data through the console interface and train a model with only a few clicks. Custom training is optional.
Many beginners come from a programming background and think 'machine learning' always means 'write algorithms'. The exam explicitly tests the no-code path for business users.
Mistake
Vertex AI Pipelines and Vertex AI Experiments are the same thing.
Correct
Pipelines automate a production workflow of steps (e.g., train, evaluate, deploy). Experiments track and compare different training runs, such as one with 10 training epochs versus 20 epochs. They serve different purposes.
The similar names ('Pipeline' vs. 'Experiment') cause confusion. The exam deliberately pairs them in wrong answers to test whether you know the distinct functions.
Mistake
You must deploy a model to an endpoint to use it for anything.
Correct
Vertex AI also supports batch prediction, where you send a file of many inputs and get a file of outputs back, with no need for a live endpoint. This is cheaper and ideal for periodic offline tasks.
Beginners focus on real-time endpoints because they are more visible, but the exam emphasises cost efficiency and serverless batch jobs.
Mistake
Vertex AI only supports TensorFlow models.
Correct
Vertex AI is framework-agnostic. It supports TensorFlow, PyTorch, scikit-learn, XGBoost, and any custom container you want to use for training and prediction.
Google developed TensorFlow, so learners assume vendor lock-in, but the exam confirms that interoperability is a design goal of Vertex AI.
Reveal each answer, then mark whether you got it right. Score 60%+ to unlock the next chapter.
No. The AutoML features let you train models with just a few clicks and no programming. However, for custom training, you need to write Python code using a framework like TensorFlow or PyTorch.
Vertex AI unifies all the separate services from the old AI Platform (e.g., training, prediction, notebooks) into one integrated product. It also adds new features like Model Registry and Pipelines. Google recommends migrating to Vertex AI.
Yes. You can upload a pre-trained model (e.g., a SavedModel from TensorFlow or a pickle file from scikit-learn) to Vertex AI and deploy it to an endpoint without retraining.
Costs vary based on usage: training time (especially if GPUs or TPUs are used), prediction request volume, and storage. You pay only for the resources you consume. AutoML also incurs charges for the automated search process.
Model drift happens when the data the model receives in production changes over time, making its predictions less accurate. Vertex AI Model Monitoring notifies you about drift so you can retrain the model and maintain reliability.
Vertex AI is a Google Cloud native service. While it can load data from external sources (via APIs), the training and deployment infrastructure runs entirely inside Google Cloud.
You've finished Machine Learning on GCP with Vertex AI. Continue through the PDE study guide to build a complete picture of the exam.
Done with this chapter?