Courseiva
hardMultiple Select

PDE Practice Question: A team is deploying a complex model with multiple…

A team is deploying a complex model with multiple preprocessing steps. They want to ensure consistent preprocessing during training and serving. Which three approaches can achieve this? (Select 3)

⚠ Common exam trap

Google Cloud often tests the misconception that a separate preprocessing service (Option B) is a good architectural pattern for consistency, when in fact it introduces a single point of failure and versioning complexity that undermines the goal of identical preprocessing.

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

✓

Store preprocessing logic in a shared Python module

Option A is correct because placing preprocessing logic in a shared Python module lets both the training code and the serving code import and execute the exact same transformation functions, eliminating drift between environments. Option D is correct because Vertex AI Feature Transform Engine lets you define transformations (e.g., in a feature store or as part of a Vertex AI pipeline) that are applied consistently at both training and online/batch serving time. Option E is correct because embedding preprocessing logic directly in the model graph (for example, as tf.keras preprocessing layers or a tf.transform graph) ensures the saved model performs the same transformations during inference as were applied during training. Option B is not appropriate because a separate preprocessing service introduces an extra network hop, latency, and a potential point of failure, and it does not by itself guarantee identical logic between training and serving. Option C is incorrect because maintaining two separate pipelines for training and serving is precisely the practice that causes training-serving skew.

Answer analysis

Option-by-option breakdown

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

  • ✓

    Store preprocessing logic in a shared Python module

    Why this is correct

    A shared Python module guarantees identical preprocessing code executes during both training and serving, eliminating transformation drift. It directly satisfies the consistency constraint by centralising logic in one versioned artefact that both pipelines import, rather than duplicating steps. This is the standard mechanism for keeping feature engineering reproducible across environments.

  • ✗

    Use a separate preprocessing service called from the model

    Why it's wrong here

    A separate preprocessing service invoked from the model adds a network hop and a second deployment that can diverge from the training code, so consistency is not guaranteed. It is tempting because microservice preprocessing is standard for shared feature engineering, and it would be correct where many models reuse one centralised transformation service.

  • ✗

    Use two separate pipelines for training and serving

    Why it's wrong here

    Two separate pipelines let training and serving preprocessing drift apart, which is the exact inconsistency the team wants to eliminate. It is tempting because splitting pipelines is common when training and serving run on different infrastructure, and it would be correct if the requirement were independent scaling rather than identical transformations.

  • ✓

    Use Vertex AI Feature Transform Engine

    Why this is correct

    Vertex AI Feature Transform Engine applies the same transformation definitions at training and online or batch serving, preventing skew. This satisfies the consistency constraint by centralising preprocessing as managed feature transformations rather than duplicated code.

  • ✓

    Embed preprocessing logic in the model graph

    Why this is correct

    Embedding preprocessing within the model graph guarantees identical transformations at training and serving, since the same computation executes in both phases. This directly satisfies the consistency constraint by eliminating separate preprocessing pipelines, which are the usual source of training–serving skew. The saved model therefore carries its own deterministic preprocessing logic.

About these practice questions

One of 747 original PDE 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 by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This PDE 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 PDE exam.