Courseiva

PMLE Scaling Prototypes into ML Models Practice Question

An ML engineer has a prototype scikit-learn model that must be served on Vertex AI. The model requires a custom preprocessing step that cannot be expressed in a scikit-learn Pipeline. The engineer wants to package the model with this preprocessing logic and deploy it to a Vertex AI Endpoint for online predictions. Which approach should they take?

⚠ Common exam trap

The trap here is assuming that Vertex AI automatically applies preprocessing defined in a scikit-learn Pipeline or that Model Monitoring can transform requests.

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

✓

Create a custom container that includes the scikit-learn model and the preprocessing code, push it to Artifact Registry, import it as a Vertex AI Model, and deploy to an Endpoint.

When a model requires custom preprocessing that is not part of the model artifact itself, the most reliable way to serve it on Vertex AI is to build a custom container. The container can include the model, the preprocessing code, and all dependencies, ensuring consistent behavior between training and serving. Vertex AI then deploys this container as a Model resource and makes it available via an Endpoint.

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 Model Monitoring to apply the preprocessing transformations before the model receives the request.

    Why it's wrong here

    Vertex AI Model Monitoring is designed to detect drift and anomalies in prediction traffic, not to transform input data. It cannot apply custom preprocessing to incoming requests. Relying on Model Monitoring would leave the model receiving raw, unprocessed features, causing incorrect predictions and potential errors.

  • ✗

    Save the model with joblib, upload it as a Vertex AI Model, and deploy it to an Endpoint; Vertex AI automatically applies the preprocessing.

    Why it's wrong here

    Vertex AI does not automatically infer or apply custom preprocessing just because a model artifact is uploaded. Without a custom serving container or a preprocessing function, the raw request would be passed directly to the scikit-learn model, which would fail or produce incorrect results. This approach only works if the preprocessing is already part of the model's predict method.

  • ✗

    Deploy the model as a batch prediction job, which automatically applies preprocessing from a saved scikit-learn Pipeline.

    Why it's wrong here

    Batch prediction does not automatically apply arbitrary preprocessing from a scikit-learn Pipeline; it expects the input data to be already prepared. Moreover, the requirement is online predictions, not batch. Batch prediction also has higher latency and is unsuitable for real-time serving. This option misrepresents both the capability and the serving mode.

  • ✓

    Create a custom container that includes the scikit-learn model and the preprocessing code, push it to Artifact Registry, import it as a Vertex AI Model, and deploy to an Endpoint.

    Why this is correct

    A custom container allows the engineer to bundle the model artifact, the preprocessing logic, and the required dependencies into a single image. Vertex AI runs this container for online predictions, so the preprocessing executes exactly as written before the model inference. This is the supported and recommended way to serve models with custom preprocessing on Vertex AI.

About these practice questions

This PMLE question is part of Courseiva's 775-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam 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.