Google Cloud Professional Machine Learning Engineer — Question 163
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?
Answer options
- A. Trigger a Cloud Build workflow to run tests, build custom Docker images, push the images to Artifact Registry, and launch the pipeline in Vertex AI Pipelines.
- B. Trigger GitHub Actions to run the tests, launch a job on Cloud Run to build custom Docker images, push the images to Artifact Registry, and launch the pipeline in Vertex AI Pipelines.
- 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.
- D. Trigger GitHub Actions to run the tests, launch a Cloud Build workflow to build custom Docker images, push the images to Artifact Registry, and launch the pipeline in Vertex AI Pipelines.
Correct answer: D
Explanation
The correct answer, D, is optimal because it utilizes GitHub Actions to run tests and enables Cloud Build to handle the Docker image creation, ensuring a smooth integration with Artifact Registry and Vertex AI Pipelines. Options A and B are less efficient as they either introduce unnecessary complexity with Cloud Build or Cloud Run. Option C lacks the proper orchestration of the build process, making D the best choice for minimizing steps while maintaining flexibility.