PMLE · LESSON 5
Section 5: Automating and orchestrating ML pipelines約18% · 2 topics
Learn end-to-end ML pipelines and automating retraining.
5.1End-to-end pipelines
End-to-end pipelines (data and model validation; Agent Platform Pipelines, Managed Service for Apache Airflow, Ray; consistency of training and serving preprocessing)
Concept
An ML pipeline automates data ingestion → validation → preprocessing → training → evaluation → model validation → registration → deployment. Use Agent Platform Pipelines (Kubeflow Pipelines and TFX formats), Managed Service for Apache Airflow (formerly Cloud Composer) for orchestrating broad workflows, and Ray for distributed processing as appropriate. Use the same preprocessing in training and serving to prevent training-serving skew.
How it works / steps
- Make each stage a component so it can be reused
- Make data validation (schema, distribution) and model validation (baseline metrics) gates
- Manage workflows that include non-ML processing with Airflow
- Share preprocessing code between training and serving
Workplace example
In Pipelines, stop training if data distribution validation fails, and register only if the evaluation AUC beats the current model.
Common confusions and exam tips
- Pipelines suit ML workflows; Airflow suits managing the organization's broader workflows
- Skipping data validation means training on broken data
- Different preprocessing in training and serving causes skew
Mini quiz
Q1. You are considering Agent Platform Pipelines for your ML steps. Compared with Kubeflow Pipelines on GKE, which advantage is most accurate?
- It gives fine-grained control over Kubernetes node settings
- Pipeline definitions do not need the Kubeflow SDK
- It runs unchanged on on-premises clusters
- It runs serverless and records artifacts and lineage automatically
Show answer and explanation
Answer: D It runs serverless and records artifacts and lineage automatically
Integrated with ML Metadata for high reproducibility. [Other options] Fine node control is a benefit of self-managed GKE. Agent Platform Pipelines is still defined with SDKs such as Kubeflow Pipelines. On-prem runs need self-managed setups like GKE.
Q2. You are designing a training pipeline. Which is the main benefit of splitting work into small components?
- More components raise training accuracy
- Splitting lowers pipeline run cost by itself
- Easier reuse, testing and caching, and reruns from the failed step
- Components pass no data between them, so no storage is needed
Show answer and explanation
Answer: C Easier reuse, testing and caching, and reruns from the failed step
Caching can skip unchanged steps. [Other options] Splitting does not change accuracy. Components pass artifacts, which need storage. Cost can drop through caching, not from splitting alone.
Reference links
5.2Automating retraining
Automating retraining (retraining policies, CI/CD/CT, Cloud Build)
Concept
Retraining policies are decided by conditions such as a schedule (periodic), data arrival, or detecting performance drops or drift. Combine CI (testing code), CD (deployment) and CT (continuous training), and use Cloud Build to automate building and running pipelines from code changes.
How it works / steps
- Decide retraining conditions (periodic, data, drift)
- Run tests and pipeline updates on code changes with Cloud Build
- Start the retraining pipeline from Model Monitoring alerts and similar
- Deploy new models only after they pass the evaluation gate
Workplace example
When model monitoring raises a drift alert, the retraining pipeline starts via Pub/Sub, and only if it passes evaluation is the new version deployed as a canary.
Common confusions and exam tips
- Retraining too often raises costs; too rarely lowers accuracy
- CT is continuous training of the model; CD is deployment automation
- Automatic retraining also needs an evaluation gate
Mini quiz
Q1. What is the most appropriate role of Cloud Build in ML CI/CD?
- Automatically relabeling training data
- Automatically running tests, builds and deployments
- Automatically monitoring production model drift
- Automatically searching model hyperparameters
Show answer and explanation
Answer: B Automatically running tests, builds and deployments
Git triggers start builds.
Q2. What is the most appropriate prerequisite for CT (continuous training)?
- New data is copied by hand and handed to training
- Training steps are manual in a notebook and differ each time
- Model evaluation criteria are undefined
- Everything from ingestion to registration is automated
Show answer and explanation
Answer: D Everything from ingestion to registration is automated
MLOps maturity levels.
Reference links
Lessons are written by this site based on public information and do not guarantee exam content. Product specifications change, so check the latest information at the reference links.
Notes (unofficial, original questions, no pass guarantee)
- The questions on this site are original practice questions written by this site based on publicly available skills outlines and exam guides. They are not actual exam questions.
- Google Cloud, Gemini, Vertex AI and Google Workspace are trademarks of Google LLC. This site is not affiliated with or endorsed by Google.
- This content is a study aid and does not guarantee a pass. Exam content, format and prerequisites may change without notice; always check the latest information on the official page before taking the exam.
- Your accuracy on the mock exam cannot be converted to the official (scaled) score and does not predict a pass or fail.
- Progress is saved only in this browser (localStorage) unless you sign in with Google to sync it. You can delete it from the Cookie & storage settings page (Japanese).