Courseiva
mediumMultiple SelectObjective-mapped

Automate ML Pipelines with Cloud Build and Vertex AI

Which THREE actions should be taken to automate a machine learning pipeline using Cloud Build and Vertex AI?

Quick Answer

The answer is to configure a Cloud Build trigger to run on commits to the source repository. This is correct because the cloudbuild.yaml file can define a step that builds a custom training container and submits it as a Vertex AI PipelineJob, creating a fully automated ML CI/CD pipeline where every code change triggers model retraining and deployment. On the Google Professional Machine Learning Engineer exam, this pattern tests your understanding of how Cloud Build acts as the CI orchestrator that invokes Vertex AI Pipelines, a common scenario in the "ML solution testing, automating, and deploying" section. A frequent trap is thinking you need a separate CI tool like Jenkins or that Vertex AI alone handles the commit trigger, but Cloud Build provides the native Git integration. Memory tip: think "Commit triggers Container, Container triggers Pipeline" — Cloud Build is the gatekeeper that connects your source code to Vertex AI’s orchestration.

⚠ Common exam trap

Google Cloud often tests the distinction between event-driven triggers (Cloud Build triggers, Pub/Sub) and polling mechanisms (Cloud Scheduler, Cloud Functions) — the trap here is that candidates may think polling or separate functions are needed for automation, when in fact Cloud Build's native triggers and pipeline submission are the correct, integrated approach.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

Write a cloudbuild.yaml that builds a training container and submits a Vertex AI PipelineJob

Cloud Build's cloudbuild.yaml can define a step that builds a custom training container and submits it as a Vertex AI PipelineJob. This directly automates the ML pipeline by using Cloud Build to trigger a Vertex AI pipeline, which is the recommended pattern for CI/CD of ML workflows.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Write a cloudbuild.yaml that builds a training container and submits a Vertex AI PipelineJob

    Why this is correct

    Cloud Build uses build config to define steps, including submitting pipeline jobs.

  • Use Cloud Functions to retrain the model each time a build completes

    Why it's wrong here

    Cloud Build steps directly call Vertex AI; no need for Cloud Functions.

  • Set up a Cloud Scheduler job to poll for new build artifacts

    Why it's wrong here

    Cloud Build triggers are event-driven, not polling-based.

  • Define the training and deployment steps in a Vertex AI Pipeline and submit it from Cloud Build

    Why this is correct

    The pipeline job includes all steps; Cloud Build orchestrates the submission.

  • Configure a Cloud Build trigger to run on commits to the source repository

    Why this is correct

    This enables continuous integration for model code and pipeline definitions.

About these practice questions

One of 990 original PMLE practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Same concept, more angles

1 more way this is tested on PMLE

These questions test the same concept from different angles. Work through them to make sure you can recognise it however the exam phrases it.

Variation 1. The exhibit shows a Cloud Build configuration. An ML engineer wants to automate the deployment of a model to Vertex AI after training. What is missing in this config to successfully deploy the model?

medium
  • A.A step to upload the training image to Artifact Registry
  • B.A step to build the serving container image
  • C.A step to run unit tests
  • D.A step to create the Vertex AI Endpoint

Why B: The Cloud Build configuration shown is for training a model, but to deploy it to Vertex AI, a serving container image must be built and pushed to Artifact Registry. Vertex AI requires a custom serving container (or a prebuilt one) to host the model for predictions. Without a step to build the serving container image (e.g., using a Dockerfile that includes the model and serving dependencies), the deployment will fail because there is no runnable image to deploy to the endpoint.

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This PMLE practice question is part of Courseiva's free Google Cloud certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the PMLE exam.