Google CloudAutomating and orchestrating ML pipelines

Feature Engineering & Transformation Consistency — PMLE Practice Question

A representative Google Cloud Professional Machine Learning Engineer (PMLE) exam question on Feature Engineering & Transformation Consistency. Work through it below, then read why each option is right or wrong.

This question is part of the free Google Cloud Professional Machine Learning Engineer practice test.

Short answer

The correct answer is C. Training now applies z-score scaling but the serving code does not, so the model sees unscaled inputs. Apply the same saved scaling step in serving through a shared component or artifact..

Transformation skew occurs when training and serving apply different preprocessing steps. The new z-score normalization in training is not mirrored in serving, causing features to have different distributions at inference time, which degrades model performance. The correct solution is to implement the same transformation in serving using a shared artifact or component. Option C directly addresses the root cause: transformation consistency. Option A incorrectly assumes z-score and one-hot encoding are incompatible—they are not. Option B conflates performance with correctness; latency wouldn't cause prediction degradation. Option D describes leakage, which inflates offline metrics but does not explain serving inputs that are no longer scaled the way the model expects.

The Question

Your team has deployed a recommendation model in production that uses feature engineering steps including log transformation of user engagement metrics and one-hot encoding of categorical features. A new data scientist joins and updates the training pipeline to add a new preprocessing step—normalization of engagement metrics using z-score scaling. The model retrains successfully, but serving predictions begin to degrade. What is the most likely root cause and the best remediation?

AZ-score normalization is incompatible with one-hot encoding; the model should use min-max scaling instead. Retrain the model with min-max scaling and update both training and serving pipelines to use this method consistently.
BThe model's inference latency increased due to the added normalization step, causing timeouts in production. Optimize the serving endpoint by increasing the machine type or enabling GPU acceleration to handle the computational overhead.
CTraining now applies z-score scaling but the serving code does not, so the model sees unscaled inputs. Apply the same saved scaling step in serving through a shared component or artifact.Correct
DThe new preprocessing step introduced data leakage because z-score statistics were computed on the full dataset. Recompute z-score parameters on the training set only and ensure serving uses the same precomputed statistics.

Why C is correct

Transformation skew occurs when training and serving apply different preprocessing steps. The new z-score normalization in training is not mirrored in serving, causing features to have different distributions at inference time, which degrades model performance. The correct solution is to implement the same transformation in serving using a shared artifact or component. Option C directly addresses the root cause: transformation consistency. Option A incorrectly assumes z-score and one-hot encoding are incompatible—they are not. Option B conflates performance with correctness; latency wouldn't cause prediction degradation. Option D describes leakage, which inflates offline metrics but does not explain serving inputs that are no longer scaled the way the model expects.

Why the other options are wrong

Option A: Z-score normalization is incompatible with one-hot encoding; the model should use min-max scaling instead. Retrain the model with min-max scaling and update both training and serving pipelines to use this method consistently.

Option A does not satisfy the requirement in the scenario. Review the explanation above: the correct choice (C) is the only one that fully meets every constraint stated in the question.

Option B: The model's inference latency increased due to the added normalization step, causing timeouts in production. Optimize the serving endpoint by increasing the machine type or enabling GPU acceleration to handle the computational overhead.

Option B does not satisfy the requirement in the scenario. Review the explanation above: the correct choice (C) is the only one that fully meets every constraint stated in the question.

Option D: The new preprocessing step introduced data leakage because z-score statistics were computed on the full dataset. Recompute z-score parameters on the training set only and ensure serving uses the same precomputed statistics.

Option D does not satisfy the requirement in the scenario. Review the explanation above: the correct choice (C) is the only one that fully meets every constraint stated in the question.

Key idea: Feature Engineering & Transformation Consistency

Transformation skew occurs when training and serving apply different preprocessing steps. The new z-score normalization in training is not mirrored in serving, causing features to have different distributions at inference time, which degrades model performance. The correct solution is to implement the same transformation in serving using a shared artifact or component. Option C directly addresses the root cause: transformation consistency. Option A incorrectly assumes z-score and one-hot encoding are incompatible—they are not. Option B conflates performance with correctness; latency wouldn't cause prediction degradation. Option D describes leakage, which inflates offline metrics but does not explain serving inputs that are no longer scaled the way the model expects. On the PMLE exam, questions in the "Automating and orchestrating ML pipelines" domain test whether you can map a scenario's constraints to the right choice. Read the requirement carefully, eliminate options that violate any single constraint, and pick the one that satisfies all of them with the least operational overhead.

Ready to see how you'd score?

Take the free practice quiz and find out which Google Cloud Professional Machine Learning Engineer domains you need to focus on. No signup required.

Practice 5 similar questions

Same cert, same or adjacent domain. Use these after reviewing the explanation.

Related Google Cloud Professional Machine Learning Engineer Practice Questions

Official sources used

Verify program and exam details at the source before scheduling.