0
0
MLOpsdevops~10 mins

Champion-challenger model comparison 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 the champion model from the model registry.

MLOps
champion_model = model_registry.[1]('champion')
Drag options to blanks, or click blank then click option'
Aload
Bdelete
Csave
Dregister
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'save' instead of 'load' will try to store a model, not retrieve it.
Using 'delete' removes the model, which is not desired here.
2fill in blank
medium

Complete the code to compare the challenger model's accuracy with the champion's.

MLOps
if challenger_accuracy [1] champion_accuracy:
Drag options to blanks, or click blank then click option'
A<
B==
C<=
D>
Attempts:
3 left
💡 Hint
Common Mistakes
Using '<' would check if challenger is worse, which is not the goal.
Using '==' only checks equality, not improvement.
3fill in blank
hard

Fix the error in the code that registers the challenger model as the new champion.

MLOps
model_registry.[1](challenger_model, name='champion')
Drag options to blanks, or click blank then click option'
Aload
Bregister
Cdelete
Dsave
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'save' might store the model but not update the registry name.
Using 'load' tries to retrieve a model, not register it.
4fill in blank
hard

Fill both blanks to create a function that evaluates model performance and decides if the challenger should replace the champion.

MLOps
def should_replace(challenger_score, champion_score):
    return challenger_score [1] champion_score and challenger_score [2] 0.8
Drag options to blanks, or click blank then click option'
A>
B<
C>=
D<=
Attempts:
3 left
💡 Hint
Common Mistakes
Using '<' in the first blank would reverse the logic.
Using '<=' in the second blank would allow scores below 0.8.
5fill in blank
hard

Fill all three blanks to update the model registry only if the challenger outperforms the champion and meets quality standards.

MLOps
if challenger_metrics['accuracy'] [1] champion_metrics['accuracy'] and challenger_metrics['f1_score'] [2] 0.75:
    model_registry.[3](challenger_model, name='champion')
Drag options to blanks, or click blank then click option'
A>
B>=
Cregister
Dsave
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'save' instead of 'register' may not update the champion label.
Using '>=' in the first blank would allow equal accuracy, not strictly better.