0
0
MLOpsdevops~10 mins

A/B testing model versions 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 deploy two model versions for A/B testing.

MLOps
deploy_model(version='[1]')
Drag options to blanks, or click blank then click option'
Av1
Blatest
Cv2
Dstable
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'latest' instead of a specific version
Deploying only one version
2fill in blank
medium

Complete the code to route 30% of traffic to model version v2.

MLOps
set_traffic_split({'v1': 70, '[1]': 30})
Drag options to blanks, or click blank then click option'
Av1
Btest
Clatest
Dv2
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'v1' for 30% which is already 70%
Using undefined version names
3fill in blank
hard

Fix the error in the code to correctly log A/B test results.

MLOps
log_results(test_name='AB_Test_1', results=[1])
Drag options to blanks, or click blank then click option'
Aresult
Bresults_data
Cresult_data
Ddata_results
Attempts:
3 left
💡 Hint
Common Mistakes
Using undefined variable names
Typos in variable names
4fill in blank
hard

Fill both blanks to create a dictionary mapping model versions to their accuracy scores.

MLOps
accuracy_scores = {'[1]': 0.85, '[2]': 0.90}
Drag options to blanks, or click blank then click option'
Av1
Bv2
Cv3
Dlatest
Attempts:
3 left
💡 Hint
Common Mistakes
Using versions not deployed
Using the same version twice
5fill in blank
hard

Fill all three blanks to filter test results for version 'v2' with accuracy above 0.88.

MLOps
filtered_results = {k: v for k, v in results.items() if k == '[1]' and v [2] [3]
Drag options to blanks, or click blank then click option'
Av1
Bv2
C>
D0.88
Attempts:
3 left
💡 Hint
Common Mistakes
Using wrong version key
Using wrong comparison operator
Using incorrect threshold