Courseiva

PMLE Scaling Prototypes into ML Models Practice Question

You have a trained XGBoost model that you want to deploy on Vertex AI for online prediction. The model expects input features in a specific order and requires a custom preprocessing step that normalizes numerical features using statistics computed during training. You need to ensure that the same preprocessing is applied at serving time. What should you do?

⚠ Common exam trap

The trap here is assuming that Vertex AI provides built-in preprocessing for custom models, when in fact you must implement it yourself, often via a custom container.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

✓

Deploy the model using a custom container that includes the preprocessing code and the trained model artifacts, and implement the preprocessing in the container's prediction handler.

For custom preprocessing with non-TensorFlow models like XGBoost, a custom container is the most reliable way to ensure that the exact same preprocessing is applied at serving time. You can embed the training statistics and logic in the container, maintaining consistency and simplifying client requests.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✗

    Use Vertex AI's built-in preprocessing feature by specifying a preprocessing function in the model's metadata when uploading.

    Why it's wrong here

    Vertex AI does not have a built-in preprocessing feature that automatically applies custom functions to online predictions. Preprocessing must be handled either within the model itself or by a custom serving container. Relying on non-existent features will lead to incorrect predictions or deployment failures.

  • ✗

    Export the model as a SavedModel and include the preprocessing logic in the model's serving signature using TensorFlow's preprocessing layers.

    Why it's wrong here

    XGBoost models are not natively exported as TensorFlow SavedModels with preprocessing layers. While you can wrap XGBoost in a TensorFlow model, it adds complexity and may not be straightforward. The recommended approach for custom preprocessing is to use a custom prediction routine or a serving container that handles it.

  • ✗

    Preprocess the input data on the client side before sending requests to the Vertex AI endpoint, using the same statistics.

    Why it's wrong here

    While client-side preprocessing can work, it pushes the responsibility to every client and increases the risk of inconsistency. If multiple clients use different preprocessing, predictions will vary. It also exposes preprocessing logic and statistics, which may be undesirable. A server-side approach ensures uniform and secure preprocessing.

  • ✓

    Deploy the model using a custom container that includes the preprocessing code and the trained model artifacts, and implement the preprocessing in the container's prediction handler.

    Why this is correct

    A custom container gives you full control over the serving logic. You can load the model and the training statistics (e.g., mean and standard deviation) and apply the exact same preprocessing in the prediction handler before passing data to the model. This ensures consistency between training and serving, which is critical for model performance.

About these practice questions

One of 775 original PMLE practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written and reviewed by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

Last reviewed September 2026 · checked against the official Google Cloud exam blueprint

This PMLE practice question is part of Courseiva's free Google Cloud certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the PMLE exam.