nerdexam
Google

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.

Submitted by stefanr· Apr 18, 2026ML pipeline operationalization

Question

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 Kubernetes Engine (GKE) cluster. Your model requires pre and postprocessing steps. You need to implement the processing steps so that they run at serving time. You want to minimize code changes and infrastructure maintenance, and deploy your model into production as quickly as possible. What should you do?

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)
  • A
    13% (4)
  • B
    9% (3)
  • C
    3% (1)
  • D
    75% (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.

AUse FastAPI to implement an HTTP server. Create a Docker image that runs your HTTP server,

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.

BUse FastAPI to implement an HTTP server. Create a Docker image that runs your HTTP server,

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.

CUse the Predictor interface to implement a custom prediction routine. Build the custom container,

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.

DUse the XGBoost prebuilt serving container when importing the trained model into Vertex AI.Correct

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

#Model Deployment#Vertex AI#Pre/Post Processing#Managed Services

Community Discussion

No community discussion yet for this question.

Full PROFESSIONAL-MACHINE-LEARNING-ENGINEER Practice