
Answer-first summary for fast verification
Answer: 1. Wrap your model in a custom prediction routine (CPR) and build a container image from the CPR local model. 2. Upload your scikit-learn model container to Vertex AI Model Registry. 3. Deploy your model to Vertex AI Endpoints, and create a Vertex AI batch prediction job.
The correct answer is B. The key here is to minimize additional code while deploying your scikit-learn model for both online and batch predictions on Vertex AI. Using a Custom Prediction Routine (CPR) allows you to wrap your model with pre/post-processing code easily without dealing with the complexities of setting up an HTTP server or building a container from scratch. This makes it simpler and more efficient compared to creating a custom container and defining custom serving functions from scratch. Additionally, pre-built containers as mentioned in options A and D do not support preprocessing of data, thus making option B the most suitable one.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
No comments yet.
You have recently trained a scikit-learn model for a machine learning project, and you plan to deploy this model on Vertex AI, a managed machine learning platform by Google Cloud. The model needs to support both online and batch predictions, and you need to preprocess input data before model inference. Your goal is to package the model for deployment with minimal additional code. What steps should you follow to achieve this?
A
B
C
D