0
0
MLOpsdevops~10 mins

Why feature stores prevent training-serving skew in MLOps - Test Your Understanding

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to show how a feature store helps avoid skew by using the same {{BLANK_1}} for training and serving.

MLOps
features = feature_store.get_features([1])
model.train(features)
Drag options to blanks, or click blank then click option'
Aold_data
Bfeature_names
Cdifferent_features
Drandom_values
Attempts:
3 left
💡 Hint
Common Mistakes
Using different feature sets causes skew.
Using random or old data instead of consistent features.
2fill in blank
medium

Complete the code to fetch features from the feature store during serving using the same {{BLANK_1}} as training.

MLOps
serving_features = feature_store.get_features([1])
predictions = model.predict(serving_features)
Drag options to blanks, or click blank then click option'
Arandom_ids
Bold_features
Cfeature_names
Ddifferent_ids
Attempts:
3 left
💡 Hint
Common Mistakes
Using random or different IDs causes mismatch.
Using old features not aligned with training data.
3fill in blank
hard

Fix the error in this code snippet that causes training-serving skew by replacing {{BLANK_1}} with the correct feature source.

MLOps
training_data = load_data()
features = [1]
model.train(features)
Drag options to blanks, or click blank then click option'
Afeature_store.get_features()
Brandom_features
Cold_features
Dtraining_data.features
Attempts:
3 left
💡 Hint
Common Mistakes
Using random or old features causes skew.
Directly using training data features without feature store.
4fill in blank
hard

Fill both blanks to complete the code that ensures no skew by using the feature store for both {{BLANK_1}} and {{BLANK_2}}.

MLOps
train_features = feature_store.get_features([1])
serve_features = feature_store.get_features([2])
model.train(train_features)
predictions = model.predict(serve_features)
Drag options to blanks, or click blank then click option'
Afeature_names
Brandom_ids
Dold_data
Attempts:
3 left
💡 Hint
Common Mistakes
Using different IDs or old data causes skew.
Not using the feature store consistently.
5fill in blank
hard

Fill all three blanks to complete the code that prevents training-serving skew by using the feature store's {{BLANK_1}}, {{BLANK_2}}, and {{BLANK_3}}.

MLOps
features = feature_store.get_features([1])
model.train(features)
serve_features = feature_store.get_features([2])
predictions = model.predict(serve_features)
assert [3] == serve_features.columns
Drag options to blanks, or click blank then click option'
Afeature_names
Cfeatures.columns
Drandom_features
Attempts:
3 left
💡 Hint
Common Mistakes
Using random features causes mismatch.
Not verifying feature columns leads to skew.