How to deploy models in Vertex AI Pipelines?

PMLE By islever Editorial Last updated

Short answer

D Chain the Vertex AI ModelUploadOp and ModelDeployOp components together

Question

You are developing an ML pipeline using Vertex AI Pipelines. You want your pipeline to upload a new version of the XGBoost model to Vertex AI Model Registry and deploy it to Vertex AI Endpoints for online inference. You want to use the simplest approach. What should you do?
  1. Use the Vertex AI REST API within a custom component based on a vertex-ai/prediction/xgboost-cpu image
  2. Use the Vertex AI ModelEvaluationOp component to evaluate the model
  3. Use the Vertex AI SDK for Python within a custom component based on a python:3.10 image
  4. Chain the Vertex AI ModelUploadOp and ModelDeployOp components together Correct Answer

Key Takeaways

This question tests knowledge of Vertex AI pre-built pipeline components versus custom implementation, with the trap being choosing a more complex custom solution (SDK or REST API) when a simpler built-in component exists.

To deploy an XGBoost model in Vertex AI Pipelines, using pre-built components like ModelUploadOp and ModelDeployOp is the simplest method. The community agrees that chaining these built-in components is more efficient than custom code or REST APIs.

Common mistake: Choosing Option C (Vertex AI SDK) is a common mistake because, while functional, it requires significantly more setup and dependency management than the dedicated pre-built components.

Expert Analysis

Why the Answer Is Correct

Option D is correct because Vertex AI Pipelines provides pre-built components specifically for Model Registry and Endpoint management. Chaining ModelUploadOp and ModelDeployOp allows users to perform these actions with minimal code, simply by passing parameters like model path and container URI. This aligns with the requirement for the "simplest approach" by leveraging Google's managed infrastructure directly within the pipeline definition.

Why the Other Options Are Wrong

Option A is incorrect because using the REST API within a custom component requires manual error handling and authentication logic, adding unnecessary complexity. Option B is incorrect because ModelEvaluationOp is designed solely for evaluating model performance metrics, not for uploading or deploying models. Option C is incorrect because while the SDK is powerful, wrapping it in a custom component involves building container images and managing dependencies, which is not the simplest method compared to pre-built components.

Community Comment Notes

Community comments emphasize that ModelUploadOp and ModelDeployOp are "pre-built components" offering a "user-friendly interface." Users noted that Options A and C involve "more manual coding" and "setup," making them inferior choices when simplicity is the priority. References to Google Cloud documentation were provided to support the use of these specific components.

Official Reference

https://cloud.google.com/vertex-ai/docs/pipelines/model-endpoint-component

This link opens the official vendor documentation in a new tab.

Exam Strategy

Always prioritize pre-built components over custom code in Vertex AI Pipelines unless specific customization is strictly required. Look for keywords like "simplest" or "least effort" to identify questions where built-in components are the intended solution.

Community Votes

D
100%

100% of anonymous learners picked answer D. Votes are pick records left by other test-takers — they are not the verified answer.

Discussion 3 contributions

Compiled from public community threads and reader submissions, lightly edited for clarity. Handles and vote tallies are shown as recorded, and comments reflect the views of individual contributors.

From public community threads 3

  1. fitri001 👍 2 Answered D
    Built-in Functionality: Both ModelUploadOp and ModelDeployOp are pre-built components within Vertex AI Pipelines specifically designed for uploading models and deploying them to endpoints. Ease of Use: These components offer a user-friendly interface within the pipeline definition. You only need to specify essential details like the model path, container image URI (pre-built for XGBoost is available), endpoint configuration, etc. Reduced Code Complexity: Using these components eliminates the need for writing custom code within your pipeline for model upload and deployment, simplifying your pipeline logic.
  2. pinimichele01 👍 2 Answered D
    https://cloud.google.com/vertex-ai/docs/pipelines/model-endpoint-component
  3. pikachu007 👍 1 Answered D
    A. Custom Component with REST API: This involves more manual coding and understanding of REST API endpoints, potentially increasing complexity and maintenance. B. ModelEvaluationOp: This component is primarily for model evaluation, not model upload and deployment. C. Custom Component with SDK: While feasible, it involves more setup and dependency management compared to using built-in components.

Reader comments & corrections

No reader corrections yet — spotted an error or have a note? Share it below.

Log in to comment, report an error, or add a note about this question.

Practice All PMLE Questions

Access 65 questions with complete answers and detailed explanations.

View Full PMLE Practice Test →

← Back to PMLE Study Guide