0
0
MLOpsdevops~10 mins

Why governance builds trust in ML systems 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 define a governance policy that ensures model version control.

MLOps
policy = {'model_version': [1]
Drag options to blanks, or click blank then click option'
A'v1.0'
Bmodel
Cversion
D1.0
Attempts:
3 left
💡 Hint
Common Mistakes
Using a number instead of a string for version.
2fill in blank
medium

Complete the code to log the model training start time for audit purposes.

MLOps
import datetime
start_time = datetime.datetime.[1]()
Drag options to blanks, or click blank then click option'
Anow
Btoday
Cutcnow
Dtimestamp
Attempts:
3 left
💡 Hint
Common Mistakes
Using utcnow() which returns UTC time instead of local time.
3fill in blank
hard

Fix the error in the code that checks if the model passed governance compliance.

MLOps
if compliance_status [1] True:
    print('Model approved')
Drag options to blanks, or click blank then click option'
A==
B=
Cis
D!=
Attempts:
3 left
💡 Hint
Common Mistakes
Using '=' which is assignment, not comparison.
4fill in blank
hard

Fill both blanks to create a dictionary comprehension that filters models with accuracy above 0.9.

MLOps
high_accuracy_models = {model: metrics[1]('accuracy') for model, metrics in model_metrics.items() if metrics['accuracy'] [2] 0.9}
Drag options to blanks, or click blank then click option'
A.copy()
B>
C>=
D.get
Attempts:
3 left
💡 Hint
Common Mistakes
Using .copy() which returns a copy but does not access values.
5fill in blank
hard

Fill both blanks to create a filtered dictionary of models with version starting with 'v' and accuracy above 0.85.

MLOps
filtered_models = {model: metrics for model, metrics in all_models.items() if model[1] and metrics['accuracy'] [2] 0.85}
Drag options to blanks, or click blank then click option'
A:
B.startswith('v')
C>=
D==
Attempts:
3 left
💡 Hint
Common Mistakes
Using '==' instead of .startswith() for string prefix check.