Professional Machine Learning Engineer Exam QuestionsBrowse all questions from this exam

Professional Machine Learning Engineer Exam - Question 166


You developed a Vertex AI ML pipeline that consists of preprocessing and training steps and each set of steps runs on a separate custom Docker image. Your organization uses GitHub and GitHub Actions as CI/CD to run unit and integration tests. You need to automate the model retraining workflow so that it can be initiated both manually and when a new version of the code is merged in the main branch. You want to minimize the steps required to build the workflow while also allowing for maximum flexibility. How should you configure the CI/CD workflow?

Show Answer
Correct Answer: BC

To automate the model retraining workflow, GitHub Actions should be used to run the tests, build the custom Docker images, push the images to Artifact Registry, and launch the pipeline in Vertex AI Pipelines. This configuration minimizes the steps required to build the workflow and leverages GitHub Actions for testing and image building, simplifying the overall process while maintaining flexibility. Building and managing everything within GitHub Actions reduces the complexity and avoids unnecessary use of additional services.

Discussion

12 comments
Sign in to comment
pikachu007Option: C
Jan 10, 2024

Considering the goal of minimizing steps while allowing for flexibility, option C - "Trigger GitHub Actions to run the tests, build custom Docker images, push the images to Artifact Registry, and launch the pipeline in Vertex AI Pipelines" appears to be the most straightforward approach. It leverages GitHub Actions for testing and image building, then directly triggers the Vertex AI Pipelines, simplifying the workflow and reducing unnecessary services involved in the process.

shadz10Option: D
Jan 18, 2024

D https://cloud.google.com/build/docs/building/build-containers https://cloud.google.com/build/docs/build-push-docker-image

AnnaROption: D
Apr 27, 2024

Not A: does not leverage the integration capabilities of GitHub Actions with GitHub for initial testing, which is more efficient when managing repo triggers and workflows directly from Github. Not B: Cloud Run for running stateless containers, not for CI/CD tasks like building and pushing images Not C: building docker images directly in github Actions can encounter limits in terms of build performance and resource availability, esp. for complex images

BlehMaksOption: D
Jan 8, 2024

i think it's D

b1a8faeOption: C
Jan 8, 2024

I am torn between C and D. GitHub actions to run the tests is definitely the simplest. Cloud Build allows to access fully managed CI/CD workflow (you could setup the Docker build job), but I figure it would be easier to do it from GitHub actions directly (https://docs.github.com/en/actions/creating-actions/creating-a-docker-container-action) which allows you to use 1 tool less and achieve the same result.

36bdc1eOption: C
Jan 11, 2024

The best approach would be Option C. By triggering GitHub Actions to run the tests, build custom Docker images, push the images to Artifact Registry, and launch the pipeline in Vertex AI Pipelines, you can automate the model retraining workflow. This approach allows for maximum flexibility and minimizes the steps required to build the workflow.

mindriddlerOption: C
Feb 4, 2024

It has to be C. Therese no need to use both GH Actions and Cloud Build when GH Actions can do it all by itself

guilhermebutzkeOption: D
Feb 6, 2024

Choose D: GitHub Actions should be used to run tests and initiate the workflow upon code merges. Then, Cloud Build is a suitable service for building Docker images and handling the subsequent steps of pushing the images to Artifact Registry. So, Vertex AI Pipelines can be launched as part of the Cloud Build workflow for model retraining. In A Using Cloud Build directly from GitHub Actions would bypass GitHub Actions' capabilities for triggering and testing. In B, Cloud Run for building Docker images can introduce potential compatibility issues with Vertex AI Pipelines. In C, Skipping Cloud Build for image building limits the workflow's portability and integration with Vertex AI. https://cloud.google.com/vertex-ai/docs/pipelines/introduction https://medium.com/@cait.ray13/serving-ml-model-using-google-pub-sub-python-f569c46e7eb0

pinimichele01Option: D
Apr 7, 2024

i agree with guilhermebutzke

fitri001Option: D
Apr 21, 2024

Security: GitHub Actions are ideal for running unit and integration tests within the controlled environment of your GitHub repository. This keeps your test code separate from the production pipeline code running in Cloud Build. Scalability and Resource Management: Cloud Build is a managed service specifically designed for building container images in Google Cloud. It offers better resource management and scalability for building Docker images compared to Cloud Run, which is primarily designed for running stateless containers. Flexibility: This configuration allows for independent scaling of test execution (in GitHub Actions) and image building (in Cloud Build). You can modify the workflow files in each platform independently without affecting the other.

fitri001
Apr 21, 2024

A & B. Cloud Run for Image Building: While Cloud Run can build Docker images, it's not its primary function. Cloud Build is a more robust and scalable solution for container image building in Google Cloud. C. Building Images in GitHub Actions: GitHub Actions might have limitations on resource allocation and might not be suitable for building complex Docker images, especially if they have large dependencies.

gscharlyOption: D
Apr 21, 2024

agree with guilhermebutzke

AzureDP900Option: C
Jun 21, 2024

option D might seem appealing at first, but it adds unnecessary complexity and makes it more challenging to manage the state of your pipeline. Option C, on the other hand, provides a simpler and more straightforward approach to automating your model retraining workflow using GitHub Actions.