Google Professional Machine Learning Engineer Question 348
Single answerGoogle Cloud PlatformYou are deploying a machine learning model for real-time predictions using a containerized serving solution on Google Cloud. The model is wrapped in a Docker container and needs to scale automatically based on incoming traffic. Which Google Cloud service should you use to serve the model?
- A
Google Kubernetes Engine (GKE) with Horizontal Pod Autoscaler
- B
Cloud Run
- C
Vertex AI Prediction
- D
Cloud Functions
Show answer and explanation
Correct answer: B
Explanation
Cloud Run is the best choice for serving containerized applications like a Dockerized machine learning model in a fully managed, serverless environment. It automatically scales based on incoming traffic, reducing operational overhead and providing a streamlined deployment experience. While other options like GKE offer scalability, they require more management, and services like Vertex AI Prediction and Cloud Functions are not specifically designed for this use case.
- A. Incorrect.
Google Kubernetes Engine (GKE) with Horizontal Pod Autoscaler can be used for containerized workloads and scaling, but it requires more setup and management compared to fully managed services. It is better suited for scenarios where you need full control over the infrastructure.
- B. Correct.
Cloud Run is a fully managed service that is ideal for deploying containerized applications, including machine learning models. It supports automatic scaling and handles incoming traffic seamlessly, making it a suitable choice for this scenario.
- C. Incorrect.
Vertex AI Prediction is designed for serving machine learning models but is typically used to deploy models directly from the Vertex AI platform. It does not specifically handle Docker containers directly in the way Cloud Run does.
- D. Incorrect.
Cloud Functions is a serverless platform for running lightweight functions in response to events. It is not suitable for serving containerized applications, such as Docker containers, for real-time predictions.