Google Cloud Professional Machine Learning Engineer — Question 180

You have recently trained a scikit-learn model that you plan to deploy on Vertex AI. This model will support both online and batch prediction. You need to preprocess input data for model inference. You want to package the model for deployment while minimizing additional code. What should you do?

Answer options

Correct answer: B

Explanation

Answer B is correct because it recommends wrapping the model in a custom prediction routine, ensuring that it can be deployed with minimal additional code. The other options involve either unnecessary steps or custom implementations that would add complexity to the deployment process.