If you do not manage machine learning models carefully, they will fail silently in production, costing your company money and trust. This chapter introduces MLOps, which takes the best practises from software engineering (like DevOps) and applies them to machine learning. By the end, you will understand how to track model versions, automate retraining, set up guardrails for fairness and security, and help data scientists collaborate effectively with engineers and business leaders — all essential skills for the Google Professional Machine Learning Engineer exam.
Jump to a section
A simple way to picture MLOps, Governance, and Collaboration
A head chef in a busy restaurant is the central figure who makes sure the kitchen runs smoothly. They do not just cook one dish perfectly once. They have to think about how the entire kitchen team works together over months and years.
The head chef creates a master recipe book. This book does not just list ingredients. It specifies exact cooking temperatures, plating techniques, and what to do if a dish comes out wrong. This book is the equivalent of MLOps: a set of repeatable, automated processes for building and deploying machine learning models. Every time a new chef joins, they follow the same recipe book, ensuring the carbonara tastes the same every time. This is model version management.
But the head chef also has to follow health department rules. They cannot serve spoiled ingredients. They must label every container with the date it was prepped. This is governance: rules about data quality, model fairness, and security. The chef also works with the front-of-house team to get feedback when customers send back a steak. That feedback loop is collaboration between data scientists, engineers, and business stakeholders.
If the head chef only focused on cooking and ignored the recipe book, the health rules, or the waitstaff's feedback, the kitchen would quickly descend into chaos. Undercooked chicken orders would pile up. The health inspector would shut them down. The same chaos happens in machine learning without MLOps, governance, and collaboration.
MLOps stands for Machine Learning Operations. It is a set of practises that combine machine learning, software engineering, and DevOps to make building and running machine learning systems reliable, scalable, and maintainable. Before MLOps, many data scientists would train a model on their laptop, save it as a file, and hand it to an engineer who would try to deploy it. This was messy, slow, and fragile. The model would break because the engineer's computer had different software versions, or the model would degrade over time as the world changed.
MLOps solves this by creating a standardised pipeline. A pipeline is a sequence of automated steps that data goes through: from raw data, to cleaning, to training, to evaluation, to deployment. Each step is version-controlled, meaning the exact code, data, and model parameters used at every point are saved and can be reproduced later. This is critical for audits, debugging, and compliance.
Version control is the practise of tracking changes to files over time. In MLOps, you version not just code but also your datasets and your trained models. A model dataset version tells you which exact rows of data were used to train a particular model. If a model starts making bad predictions six months later, you can go back and see exactly what it learned from and why. This helps you fix problems faster.
Automation is another pillar. Instead of a person manually clicking buttons to retrain a model every week, you write a script that runs on a schedule or triggers when new data arrives. This script extracts data, preprocesses it, trains a new model, runs tests to check performance, and then deploys the model if it passes. This is called Continuous Integration and Continuous Deployment (CI/CD) for machine learning. Continuous Integration means every code change is automatically tested. Continuous Deployment means that if the tests pass, the model is automatically released to production.
Governance refers to the policies and rules that ensure models are fair, explainable, secure, and compliant with laws like GDPR. Fairness means the model does not discriminate against groups of people based on race, gender, or other protected characteristics. Explainability means you can understand why a model made a particular prediction. Security means protecting the model from attacks, such as someone feeding it fake data to trick it. Compliance means following regulations, such as storing user data only as long as needed.
Collaboration is about making it easy for different roles to work together. A data scientist may build a model using Python and a Jupyter notebook. A machine learning engineer may need to turn that notebook into a production service. A business analyst may need to look at model performance reports. Collaboration tools and platforms (like Google's Vertex AI) provide a shared workspace where everyone can see the same experiments, data, and models. This avoids the classic problem of 'it worked on my machine, but not on yours'.
In traditional software without MLOps, you might have:
A data scientist manually exporting a model file.
An engineer trying to install the right Python packages on a server.
A business person asking why the model is suddenly suggesting wrong products.
No clear way to reproduce what happened.
With MLOps, you have:
A central repository of all models, datasets, and experiments.
Automated pipelines that retrain and deploy without human error.
Dashboards showing model performance over time.
Audit trails linking every deployment to its exact source code and training data.
Monitoring is the final piece. Once a model is live, you must watch its predictions. If the accuracy drops or the model starts behaving strangely, you get an alert. This could happen because the world changed (a concept called 'data drift') or because someone changed the system that feeds data into the model (a 'pipeline breakage'). Monitoring lets you catch these problems early before they hurt customers.
In summary, MLOps, governance, and collaboration exist to make machine learning teams as reliable and efficient as a well-run software development team. Without them, your models are a house of cards that will fall apart under pressure.
Data Ingestion and Validation
Raw data is collected from various sources (databases, APIs, logs). The pipeline automatically validates the data for schema correctness, missing values, and anomalies. This step ensures garbage data does not enter the training process, which would lead to a poor model.
Feature Engineering and Versioning
Raw data is transformed into features (numerical representations) that the model can learn from. These features are stored in a feature store with version tags. This allows different models to reuse the same features and track exactly which feature version was used in training.
Model Training and Experiment Tracking
Multiple model variations are trained with different hyperparameters (settings). Each experiment is logged with its code, dataset, hyperparameters, and performance metrics. This enables the team to compare experiments and select the best performing model.
Model Evaluation and Governance Gates
The candidate model is evaluated against a withheld test set. Automated governance checks are run: fairness analysis, explainability reports, and performance benchmarks. The model must pass all gates before it can be considered for deployment.
Shadow Deployment and Gradual Rollout
The new model is deployed in shadow mode (predictions logged but not served). After validation, it is gradually rolled out to a small percentage of users using feature flags. If performance drops, the system automatically rolls back to the previous version.
Monitoring and Continuous Training Trigger
Once live, the model's predictions and input data are continuously monitored. If data drift or concept drift is detected, an alert is sent and a retraining pipeline is automatically triggered using the most recent data, creating a feedback loop.
An IT professional working at an e-commerce company is tasked with building and maintaining a model that recommends products to customers. Here is what a typical day or week might look like with MLOps, governance, and collaboration in place.
First, the data scientist in the team writes a new feature extraction script in Python. Instead of emailing the script to someone else, they commit it to a shared code repository (like Git) along with a description of what changed. The MLOps system automatically detects the new commit and runs a series of tests: does the code compile? Does it produce the expected output format? Are there any security vulnerabilities in the code? This is the Continuous Integration step.
Once the code passes local tests, the system kicks off a full training pipeline. It pulls the latest approved dataset from a central data store, which has version tags like '2025-03-01-v2'. The pipeline preprocesses the data, trains a candidate model, and evaluates it against a holdout test set. The results — accuracy, precision, recall, and a fairness audit score — are recorded in an experiment tracking tool. The data scientist can log in, compare this new model with the previous one, and decide whether to promote it.
Next comes the governance check. The system automatically checks that the new model does not discriminate based on protected attributes (like gender or age) by analysing its predictions on a specially curated fairness dataset. If the model unfairly favours one demographic, it is blocked from deployment. An alert goes to the engineering lead and the legal team. They discuss whether the model needs to be retrained with different data or if a business rule override is acceptable.
If fairness passes, the model goes through a shadow deployment. In a shadow deployment, the new model runs alongside the old one but its recommendations are not shown to customers yet. The team compares the two sets of recommendations for a week. They look for anomalies: is the new model recommending significantly different products? Does it have a much higher click-through rate? This is a low-risk way to validate in production.
After shadow testing, the team uses a feature flag to gradually roll out the new model to 10% of customers, then 25%, then 50%, then 100%. This gradual rollout is called a canary deployment. If at any point the system detects a spike in error rates or a drop in customer engagement, it automatically rolls back to the previous model version. The entire deployment history is logged, so the team can see exactly when each version went live and for how long.
A week later, a business analyst asks: 'Why did product recommendations change for users in France?' The engineer can quickly open the MLOps dashboard, see that the model was updated on a certain date, view the exact data used to retrain it, and check the model's performance metrics for the French segment. This transparency is impossible without proper MLOps and governance.
Finally, the team sets up monitoring alerts. If the data that feeds the model starts showing a different distribution from what the model was trained on (data drift), they get a notification. They may then trigger an automatic retraining pipeline that uses the latest data without human intervention. This keeps the model fresh and accurate without the data scientist having to wake up at 3 a.m. to fix it.
The Google Professional Machine Learning Engineer exam covers MLOps, governance, and collaboration in depth, and you need to understand the exact concepts they test. The exam will expect you to know the difference between orchestration and automation, and how tools like Vertex AI Pipelines and Cloud Build fit together. They love to test your understanding of the ML lifecycle stages: data ingestion, data validation, model training, model evaluation, model deployment, and monitoring. Expect scenario-based questions where you have to choose the best MLOps tool or process for a given situation.
Common exam topics include:
CI/CD for ML (also called CT — Continuous Training). Know that CI/CD is about code, while CT is about automatically retraining models on new data.
Feature stores: centralised repositories for reusable features. The exam checks if you know why a feature store helps with consistency and reusability across teams.
Model versioning and lineage: you must understand how to track which dataset, code, and parameters produced each model. Google Cloud uses Vertex AI Experiments and Vertex ML Metadata for this.
Model monitoring: you need to know about data drift and concept drift. Data drift is when the input data changes. Concept drift is when the relationship between input and output changes. Both require monitoring.
Governance: the exam asks about Explainable AI (XAI), fairness evaluation (often using the What-If Tool), and model registry (a central place to store, compare, and manage model versions).
Traps to watch out for:
Confusing MLOps with DevOps. MLOps is DevOps for ML, but it adds the challenges of experiment tracking, data versioning, and model lifecycle. The exam will test you on the unique aspects of MLOps that do not exist in plain DevOps.
Thinking a model trained once is finished. The exam wants you to know that models degrade over time and need continuous training and monitoring.
Forgetting that automation without governance is dangerous. They will give you a scenario where a team automates deployment but does not check for bias or data leakage, and you need to identify the missing step.
Mixing up model validation vs. model evaluation. Validation happens during training (e.g., cross-validation), evaluation happens after training on a held-out test set. The exam uses both terms.
Correct answer patterns often involve choosing the most automated and version-controlled solution. If a question asks how to deploy a model, and one option involves manual steps, the correct answer will involve an automated pipeline. If they ask how to reproduce a model, the answer will link to a model registry with metadata tracking.
Memorise these definitions:
Pipeline: a series of connected steps that process data and produce a model.
Artifact: any file produced during the ML process, such as a dataset, a model, or a metrics file.
Lineage: the history of how an artifact was created, including its inputs and transformations.
Registry: a centralised system for storing and managing models or features.
Finally, the exam tests collaboration via roles. You should know that a data scientist experiments, a ML engineer productionises, and a data engineer manages data pipelines. They all use the same platform (like Vertex AI Workbench) to collaborate.
MLOps is the set of practises that automates and standardises the machine learning lifecycle, from data preparation to deployment to monitoring.
Version control must apply not only to code but also to datasets, trained models, and experiment parameters to ensure reproducibility.
Continuous Integration for ML means automatically testing code and data quality, while Continuous Deployment for ML means automatically releasing validated models to production.
Model monitoring is not optional; you must detect data drift and concept drift to prevent silent failures that degrade customer experience.
Governance includes fairness, explainability, privacy, and security checks that are integrated directly into the ML pipeline, not as an afterthought.
Collaboration between data scientists, ML engineers, and business analysts is enabled by shared platforms like Vertex AI Workbench and centralised artifact registries.
These come up on the exam all the time. Here's how to tell them apart.
MLOps
Applies to machine learning models
Includes experiment tracking and model versioning
Must handle data drift and concept drift
DevOps
Applies to traditional software applications
Focuses on code versioning and application builds
Deals with application errors and performance, not data drift
Model Registry
Stores trained model artifacts and their metadata
Tracks model deployment history and stages
Usually has version labels for production, staging, etc.
Code Repository (e.g., Git)
Stores source code files
Tracks code changes and branches
Does not natively handle binary model files or deployment stages
Data Drift
Input distribution changes (e.g., new user demographics)
Model predictions become less accurate because input is different from training data
Detected by comparing input statistics over time
Concept Drift
Relationship between input and output changes (e.g., old patterns no longer hold)
Model predictions become less accurate even if input looks similar
Detected by comparing model accuracy over time
Batch Prediction
Model processes many inputs at once (e.g., nightly batch)
Latency is less critical (minutes/hours)
Typically cheaper per prediction in bulk
Online Prediction
Model processes one input at a time instantly (e.g., real-time recommendation)
Latency is critical (milliseconds)
Requires more infrastructure for low-latency serving
Vertex AI Pipelines
Specifically designed for ML workflows with steps like training and evaluation
Works with ML artifacts and metadata
Can use Kubeflow Pipelines DSL for orchestration
Cloud Build
General CI/CD service for building and testing any code
Focuses on code image building and deployment
Not designed for ML experiment tracking
Continuous Training (CT)
Automatically retrains models on new data
Triggered by new data arrival or schedule
Output is a new model version
Continuous Deployment (CD)
Automatically deploys the latest validated model to production
Triggered by successful training and evaluation
Output is a running service with the new model
Mistake
MLOps is just DevOps with a different name, so if I know DevOps, I already know MLOps.
Correct
MLOps adds ML-specific challenges like experiment tracking, data versioning, model drift, and fairness evaluation that are not part of traditional DevOps.
This is common because MLOps borrows the CI/CD concepts from DevOps, leading people to think it is a direct copy.
Mistake
Once a model is deployed, my job is done. I do not need to monitor it because it will keep performing the same way.
Correct
Models degrade over time due to changes in the real world (data drift and concept drift). Continuous monitoring and retraining are essential.
Traditional software stays the same after deployment, so people naturally assume ML models behave the same way. They do not realise that models learn from a snapshot of the past.
Mistake
Governance is only about legal compliance. It has nothing to do with technical implementation.
Correct
Governance includes technical controls like model explainability, fairness checks, data lineage, and access controls. It is embedded in the pipeline, not a separate checklist.
The word 'governance' sounds like a legal or HR activity, so beginners overlook its technical implementation.
Mistake
You can version your model just by saving it with a filename like model_v2.pkl. That is sufficient.
Correct
Proper model versioning requires tracking the exact code, dataset, hyperparameters, and environment that produced the model. A file name alone does not provide this context.
Many beginners come from a background of saving files manually and underestimate the complexity of reproducibility.
Mistake
Building a model automatically with a pipeline means you never need a data scientist again.
Correct
Automation handles the repetitive steps, but data scientists are still needed to design features, choose algorithms, interpret results, and handle novel problems.
There is a common fear that automation eliminates jobs, leading people to overestimate what pipelines can do.
Reveal each answer, then mark whether you got it right. Score 60%+ to unlock the next chapter.
Yes. The exam expects you to understand the full ML lifecycle with MLOps principles, including automation, versioning, monitoring, and governance. Practical knowledge of Google Cloud tools like Vertex AI Pipelines and Model Registry is also tested.
It is possible but much harder. The exam tests applied scenarios, not just theory. Working through Google Cloud's MLOps tutorials and labs will help you understand the concepts deeply.
Data drift means the input data distribution changes (e.g., customers are suddenly younger). Concept drift means the relationship between input and output changes (e.g., young customers now prefer different products). Both require model retraining.
Vertex AI is a platform that provides MLOps capabilities, but MLOps is the broader set of practises. Vertex AI includes tools for pipelines, experiments, feature store, model registry, and monitoring.
A feature store provides versioning, consistency across training and serving, and reusability for multiple models. A regular database lacks these ML-specific features. Use a feature store when multiple teams or models share features.
A model registry is a centralised repository that stores trained models, their metadata, and deployment history. It allows you to track which model version is in production, compare performance, and deploy or roll back easily.
You've finished MLOps, Governance, and Collaboration. Continue through the PMLE study guide to build a complete picture of the exam.
Done with this chapter?