0
0
MLOpsdevops~10 mins

Point-in-time correctness in MLOps - Interactive Code Practice

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

Complete the code to load a model version at a specific timestamp.

MLOps
model = mlflow.pyfunc.load_model(model_uri='models:/my_model@[1]')
Drag options to blanks, or click blank then click option'
Alatest
B2023-05-01T12:00:00Z
Cproduction
Dstaging
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'latest' loads the newest model, not the one at a specific time.
2fill in blank
medium

Complete the code to query data as it existed at a specific point in time.

MLOps
query = "SELECT * FROM feature_store WHERE event_time <= '[1]'"
Drag options to blanks, or click blank then click option'
Alatest
Bnow()
C2023-04-30T23:59:59Z
D2023-06-01
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'now()' includes current data, breaking point-in-time correctness.
3fill in blank
hard

Fix the error in the code to ensure point-in-time correctness when loading features.

MLOps
features = feature_store.get_features(entity_id=123, as_of_time=[1])
Drag options to blanks, or click blank then click option'
A'2023-05-15T10:00:00Z'
B'latest'
Cdatetime.now()
DNone
Attempts:
3 left
💡 Hint
Common Mistakes
Using datetime.now() loads current features, breaking point-in-time correctness.
4fill in blank
hard

Fill both blanks to create a feature retrieval query that respects point-in-time correctness.

MLOps
SELECT feature_value FROM features WHERE entity_id = [1] AND event_timestamp <= '[2]'
Drag options to blanks, or click blank then click option'
A12345
B2023-05-10T08:30:00Z
C67890
D2023-06-01T00:00:00Z
Attempts:
3 left
💡 Hint
Common Mistakes
Using a future timestamp or wrong entity_id breaks point-in-time correctness.
5fill in blank
hard

Fill all three blanks to build a dictionary comprehension that filters features for point-in-time correctness.

MLOps
filtered_features = {k: v for k, v in features.items() if v['timestamp'] [1] '[2]' and k != [3]
Drag options to blanks, or click blank then click option'
A<=
B2023-05-20T15:00:00Z
C'deprecated_feature'
D==
Attempts:
3 left
💡 Hint
Common Mistakes
Using '==' instead of '!=' excludes the wrong features.