nerdexam
Google

PROFESSIONAL-MACHINE-LEARNING-ENGINEER · Question #228

Your team frequently creates new ML models and runs experiments. Your team pushes code to a single repository hosted on Cloud Source Repositories. You want to create a continuous integration…

The correct answer is B. Configure a Cloud Build trigger with the event set as "Push to a branch". The first step to set up a CI pipeline that automatically retrains models upon code modification in Cloud Source Repositories is to configure a Cloud Build trigger for "Push to a branch" events.

Submitted by rania.sa· Apr 18, 2026ML pipeline operationalization

Question

Your team frequently creates new ML models and runs experiments. Your team pushes code to a single repository hosted on Cloud Source Repositories. You want to create a continuous integration pipeline that automatically retrains the models whenever there is any modification of the code. What should be your first step to set up the CI pipeline?

Options

  • AConfigure a Cloud Build trigger with the event set as "Pull Request"
  • BConfigure a Cloud Build trigger with the event set as "Push to a branch"
  • CConfigure a Cloud Function that builds the repository each time there is a code change
  • DConfigure a Cloud Function that builds the repository each time a new branch is created

How the community answered

(21 responses)
  • B
    95% (20)
  • D
    5% (1)

Why each option

The first step to set up a CI pipeline that automatically retrains models upon code modification in Cloud Source Repositories is to configure a Cloud Build trigger for "Push to a branch" events.

AConfigure a Cloud Build trigger with the event set as "Pull Request"

A "Pull Request" trigger is used for testing proposed changes before merging, not for automatically retraining models after code modification is integrated.

BConfigure a Cloud Build trigger with the event set as "Push to a branch"Correct

A Cloud Build trigger configured for "Push to a branch" events will automatically initiate a Cloud Build job whenever new code is pushed to the specified branch in Cloud Source Repositories. This is the fundamental mechanism for continuous integration, allowing subsequent steps to orchestrate model retraining.

CConfigure a Cloud Function that builds the repository each time there is a code change

Cloud Functions are event-driven but Cloud Build is specifically designed for integrating with source control repositories for CI/CD, making it the more appropriate and direct solution.

DConfigure a Cloud Function that builds the repository each time a new branch is created

Triggering on "new branch creation" is not the typical trigger for a CI pipeline that aims to retrain models based on modifications to existing code.

Concept tested: Cloud Build triggers for CI/CD

Source: https://cloud.google.com/cloud-build/docs/create-triggers

Topics

#Continuous Integration#Cloud Build#CI/CD Triggers#MLOps

Community Discussion

No community discussion yet for this question.

Full PROFESSIONAL-MACHINE-LEARNING-ENGINEER Practice