Courseiva

PMLE Scaling Prototypes into ML Models Practice Question

You are deploying a scikit-learn model to Vertex AI for online prediction. The model requires a custom preprocessing step that involves scaling numerical features and one-hot encoding categorical features. You have packaged the preprocessing and model into a single Python script that uses a custom prediction routine. You need to ensure that the online prediction service can handle varying input formats and provide low-latency responses. What should you do?

⚠ Common exam trap

The trap here is assuming that a custom container is necessary for custom preprocessing, when Vertex AI's custom prediction routines already provide this capability without the overhead of managing a 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

✓

Use Vertex AI's custom prediction routine with a preprocessor that accepts raw input and transforms it, and deploy the model as a model artifact with the custom routine.

Using a custom prediction routine with a preprocessor allows you to encapsulate preprocessing and model logic in a single package, ensuring consistency between training and serving. Vertex AI manages the infrastructure, providing low-latency and scalability. This is the most efficient and maintainable approach for scikit-learn models with custom preprocessing.

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 custom prediction routine with a preprocessor that accepts raw input and transforms it, and deploy the model as a model artifact with the custom routine.

    Why this is correct

    Vertex AI supports custom prediction routines where you can define a preprocessor that handles raw input and transforms it before passing to the model. This allows you to encapsulate preprocessing and model logic in a single Python package. It leverages Vertex AI's managed infrastructure for scaling and low-latency serving, and is the recommended approach for scikit-learn models with custom preprocessing.

  • ✗

    Deploy the model as a custom container on Vertex AI, and implement the preprocessing logic inside the container's HTTP server.

    Why it's wrong here

    While custom containers allow full control, they add operational overhead and may increase cold start times. For scikit-learn models with custom preprocessing, Vertex AI's custom prediction routines are sufficient and simpler to manage. Using a custom container would require you to handle scaling, logging, and monitoring yourself, which is unnecessary here.

  • ✗

    Use Vertex AI's feature store to perform preprocessing, and then feed the features directly to the model.

    Why it's wrong here

    Vertex AI Feature Store is designed for managing and serving features, but it does not perform arbitrary preprocessing like scaling and one-hot encoding on the fly for online prediction. It is more suited for feature management and reuse across models. Using it for this purpose would require significant setup and may not provide the low-latency transformation needed.

  • ✗

    Deploy the model using Vertex AI's built-in scikit-learn container, and perform preprocessing on the client side before sending requests.

    Why it's wrong here

    Performing preprocessing on the client side shifts the burden to the client and may not be feasible if there are multiple clients with different preprocessing needs. It also increases the risk of inconsistencies between training and serving. The built-in scikit-learn container does not support custom preprocessing, so this approach would require additional client-side code and coordination.

About these practice questions

Courseiva writes every PMLE question from scratch — 775 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. 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.