PROFESSIONAL-MACHINE-LEARNING-ENGINEER · Question #190
You recently used XGBoost to train a model in Python that will be used for online serving. Your model prediction service will be called by a backend service implemented in Golang running on a Google K
The correct answer is D. Use the XGBoost prebuilt serving container when importing the trained model into Vertex AI.. To quickly deploy an XGBoost model with pre/post-processing for online serving, leverage Vertex AI's prebuilt serving containers to minimize custom code and infrastructure overhead.
Question
Options
- AUse FastAPI to implement an HTTP server. Create a Docker image that runs your HTTP server,
- BUse FastAPI to implement an HTTP server. Create a Docker image that runs your HTTP server,
- CUse the Predictor interface to implement a custom prediction routine. Build the custom container,
- DUse the XGBoost prebuilt serving container when importing the trained model into Vertex AI.
How the community answered
(32 responses)- A13% (4)
- B9% (3)
- C3% (1)
- D75% (24)
Why each option
To quickly deploy an XGBoost model with pre/post-processing for online serving, leverage Vertex AI's prebuilt serving containers to minimize custom code and infrastructure overhead.
Using FastAPI and creating a Docker image introduces more custom code and maintenance overhead for the serving infrastructure compared to using Vertex AI's managed services and prebuilt containers.
Using FastAPI and creating a Docker image introduces more custom code and maintenance overhead for the serving infrastructure compared to using Vertex AI's managed services and prebuilt containers.
While using the Predictor interface and a custom container is a valid approach, it involves more effort in building and maintaining the custom container compared to extending a prebuilt one, which contradicts the goal of minimizing code changes and infrastructure maintenance.
Vertex AI's prebuilt serving containers, including those for XGBoost, allow for quick deployment of models. These containers can be extended with custom pre- and post-processing logic by providing a custom handler, minimizing infrastructure maintenance and custom code for the serving environment itself.
Concept tested: Vertex AI prebuilt containers with custom prediction routines
Source: https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements
Topics
Community Discussion
No community discussion yet for this question.