PMLE Scaling Prototypes into ML Models Practice Question
You are deploying a custom model to Vertex AI for online prediction. The model requires a preprocessing step that normalizes input features. You want to ensure that the same preprocessing is applied during both training and serving to avoid training-serving skew. What should you do?
⚠ Common exam trap
The trap here is thinking that duplicating preprocessing code in both training and serving is sufficient, but it often leads to skew due to maintenance issues; using a shared transform function is more reliable.
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
✓
Export the preprocessing as a TensorFlow Transform (tf.Transform) function and include it in both training and serving graphs.
Using TensorFlow Transform (tf.Transform) to define preprocessing ensures that the same transformations are applied during both training and serving. The transform function is included in the model graph, so the serving container automatically applies the same logic. This eliminates manual replication and reduces the risk of 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.
- ✗
Use Vertex AI Feature Store to serve features and apply preprocessing at training time only.
Why it's wrong here
Vertex AI Feature Store is designed for feature management and serving, but it does not automatically apply the same preprocessing during serving unless the features are preprocessed before ingestion. Applying preprocessing only at training time would cause skew because serving would use raw features. Feature Store can help with consistency if features are precomputed, but it does not inherently handle on-the-fly preprocessing.
- ✗
Perform preprocessing on the client side before sending data to the model for prediction.
Why it's wrong here
Client-side preprocessing shifts the responsibility to the client, which may not be under your control. Different clients might implement preprocessing differently, leading to inconsistencies. It also does not guarantee that the same preprocessing is applied during training, so skew can still occur. This approach is not recommended for ensuring consistency.
- ✓
Export the preprocessing as a TensorFlow Transform (tf.Transform) function and include it in both training and serving graphs.
Why this is correct
tf.Transform allows you to define preprocessing as a function that can be applied consistently during training and serving. By exporting the transform function and including it in both the training and serving graphs, you ensure identical preprocessing. This is a best practice for avoiding training-serving skew, as the same code is used in both phases.
- ✗
Include the preprocessing logic in the training script and replicate it in the serving container.
Why it's wrong here
Replicating preprocessing logic in both training and serving can lead to inconsistencies if the code diverges over time. It requires manual synchronization and is error-prone. While it might work initially, it does not provide a robust solution to prevent training-serving skew, as changes in one place may not be reflected in the other.
Go deeper
Related to this question
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 →
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.