GCP Professional ML Engineer Practice Question 19: CI/CD Pipeline Component Changes
Google Cloud Professional Machine Learning Engineer · Test 2 · question 9 of 10
An ML platform team owns the retraining pipeline's component source. Today a data scientist edits a component, rebuilds its image by hand, recompiles the pipeline locally, and uploads the new definition, and last month a component whose unit tests were failing reached production that way. You need every merge to the component repository to run the unit and integration tests, rebuild the affected component images, recompile the pipeline, and publish the new pipeline definition, with no step depending on a workstation.
What should you implement?
Show answer and explanation
Answer:
This is the CI/CD half of CI/CD/CT. In an ML system, continuous integration tests and validates components, data and models, and continuous delivery ships the *training pipeline*, the system that produces the model, not just a model artifact. Google's reference architecture sets this up with Cloud Build: a trigger on the source repository executes the build steps that run the tests, build and push the component container images to Artifact Registry, compile the pipeline definition, and publish it, so nothing depends on a developer's machine (option C).
- A is wrong because pulling source at run time skips the test and build gates entirely. It ships untested code straight into a training run and gives you no versioned, reproducible pipeline definition to roll back to. - B is wrong because it moves testing to run time, after the change is already deployed. It catches a bad component during training rather than blocking it from being published, and it does nothing about the manual image build and compile steps. - D is wrong because a review policy still relies on a human running tests locally and reporting them honestly (the exact hole that let the failing component through), and it automates none of the build, compile or publish work.
Reference: Architecture for MLOps using TensorFlow Extended, Agent Platform Pipelines, and Cloud Build