Implementing Continuous Training with Cloud Build and Agent Platform Pipelines

PMLE By islever Editorial Last updated

Short answer

D Create a Cloud Build trigger associated with the repository. Define a build configuration file that runs the unit tests and triggers a job on Agent Platform Pipelines. Use the model evaluation component to validate the model performance before deployment.

Question

You manage an ML workflow for a fraud detection model. The source code for data processing and model training is stored in a version control repository. You need to implement a continuous training (CT) pipeline that automatically runs unit tests and launches a new training run on Agent Platform Pipelines when code is updated in the repository. You want to use a fully managed service to orchestrate this process. What should you do?
  1. Create a Cloud Run function that is triggered by repository commits. The function runs the unit tests, launches a custom training job, and uses Model Monitoring to validate the new model’s performance before deployment.
  2. Define a Cloud Workflow to monitor the repository for changes. Configure the workflow on Agent Platform Pipelines to orchestrate and run the unit tests. Use the model evaluation component to validate the new model’s performance before deployment.
  3. Configure Agent Platform Pipelines to poll the repository for updates. Add a conditional step in the pipeline that uses Model Monitoring to validate the new model’s performance before deployment.
  4. Create a Cloud Build trigger associated with the repository. Define a build configuration file that runs the unit tests and triggers a job on Agent Platform Pipelines. Use the model evaluation component to validate the model performance before deployment. Correct Answer

Key Takeaways

The question tests the distinction between CI/CD orchestration (Cloud Build) and ML pipeline execution (Agent Platform Pipelines), highlighting that Cloud Build is the managed service best suited for triggering workflows based on repository commits.

Learn how to implement a continuous training pipeline using Cloud Build triggers for automated testing and Agent Platform Pipelines for model training on Google Cloud.

Common mistake: Candidates often choose Cloud Workflows or Cloud Run, mistakenly believing they can directly handle repository triggers. However, Cloud Build is the specific service designed for CI/CD triggers and managing build configurations that can invoke other services.

Expert Analysis

The scenario requires a fully managed service to orchestrate a Continuous Training (CT) pipeline triggered by source code updates in a version control repository. The process must run unit tests and launch training on Agent Platform Pipelines.

Cloud Build is Google Cloud's fully managed CI/CD service designed specifically for this pattern. It supports triggers that automatically fire when changes are pushed to a repository (e.g., GitHub, GitLab, or Cloud Source Repositories). By defining a cloudbuild.yaml configuration file, you can sequence steps: first running unit tests (using standard build tools or containers), and then invoking the Agent Platform Pipelines API to start a new training job. If the tests fail, the build stops, preventing bad code from triggering training.

Other options are incorrect:

  • A (Cloud Run): While Cloud Run can be triggered, it is generally used for serving requests or handling webhooks, not as the primary orchestrator for complex ML pipelines with built-in CI/CD logic like test gating. It also lacks the native "trigger on commit" integration that Cloud Build provides out-of-the-box without additional infrastructure setup.
  • B (Cloud Workflows): Cloud Workflows is an orchestration service, but it does not natively trigger on repository commits in the same seamless way Cloud Build does. It would require an external event source (like Pub/Sub) to notify it of changes, adding unnecessary complexity compared to Cloud Build's native triggers.
  • C (Agent Platform Pipelines polling): Polling is inefficient and not a recommended pattern for real-time CT. Furthermore, Agent Platform Pipelines focuses on the ML workflow execution (training, evaluation) rather than the CI/CD trigger mechanism itself. Using Model Monitoring is also conceptually wrong here; Model Evaluation components are used during the pipeline to validate performance against thresholds before deployment, whereas Model Monitoring is for post-deployment drift detection.

The comments correctly identify D as the answer, emphasizing that Cloud Build handles the CI/CD trigger and test execution, while Agent Platform Pipelines handles the training workflow.

Official Reference

Exam Strategy

When asked about automating processes based on code commits or repository changes, always consider Cloud Build as the primary CI/CD orchestrator. Look for keywords like 'trigger', 'unit tests', and 'build configuration'. For ML-specific tasks like training and evaluation within that triggered flow, look for services like Vertex AI Pipelines or Agent Platform Pipelines. Do not confuse CI/CD triggers with general orchestration tools like Cloud Workflows, which lack native repo-trigger capabilities.

Community Votes

D
100%

100% of anonymous learners picked answer D. Votes are pick records left by other test-takers — they are not the verified answer.

Discussion 3 contributions

Compiled from public community threads and reader submissions, lightly edited for clarity. Handles and vote tallies are shown as recorded, and comments reflect the views of individual contributors.

From public community threads 3

  1. taylz876 👍 1 Answered D
    Similar to Q9, Q217 and Q310 Why D is right • A repository change should start the process automatically: a Cloud Build trigger fires on a commit, which is managed CI/CD. • Unit tests, then training: the build file runs the tests first, and only if they pass does it launch the training pipeline. • Validate before deploying: the model evaluation component in the pipeline checks the new model's performance first. Why the others are wrong • A: A Cloud Run function (now a Cloud Run Function) running the tests and the training job is custom plumbing, and Model Monitoring watches a deployed model, not a new one. • B: Cloud Workflows that "monitor the repository" aren't a CI trigger. • C: Pipelines don't poll repositories, and Model Monitoring doesn't validate a new model before deployment.
  2. RajuMVV 👍 1 Answered D
    The correct answer is D. Create a Cloud Build trigger associated with the repository. Define a build configuration file that runs the unit tests and triggers a job on Agent Platform Pipelines. Use the model evaluation component to validate the model performance before deployment.
  3. n2183712847 👍 1 Answered D
    Correct answer: D. Cloud Build is a fully managed CI/CD service that can trigger on repository changes, run unit tests, and launch an Agent Platform Pipelines training workflow, with model evaluation used to validate performance before deployment.

Reader comments & corrections

No reader corrections yet — spotted an error or have a note? Share it below.

Log in to comment, report an error, or add a note about this question.

Practice All PMLE Questions

Access 65 questions with complete answers and detailed explanations.

View Full PMLE Practice Test →

← Back to PMLE Study Guide