0
0
MLOpsdevops~10 mins

Canary releases for model updates 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 a new model version using a canary release.

MLOps
deploy_model(version='v2', traffic_split=[1])
Drag options to blanks, or click blank then click option'
A10
B100
C0
D50
Attempts:
3 left
💡 Hint
Common Mistakes
Setting traffic to 100% immediately, which is not a canary release.
2fill in blank
medium

Complete the code to monitor the canary model's performance metric.

MLOps
monitor_metric(model_version='v2', metric='latency', threshold=[1])
Drag options to blanks, or click blank then click option'
A0.5
B5.0
C1.0
D10.0
Attempts:
3 left
💡 Hint
Common Mistakes
Setting threshold too high, missing early performance problems.
3fill in blank
hard

Fix the error in the canary release rollout command.

MLOps
rollout_canary(model='v2', traffic=[1], duration='1h')
Drag options to blanks, or click blank then click option'
A'10%'
B10
C0.1
Dten
Attempts:
3 left
💡 Hint
Common Mistakes
Using string values for traffic percentage.
4fill in blank
hard

Fill both blanks to create a dictionary for traffic routing in canary release.

MLOps
traffic_split = {'stable': [1], 'canary': [2]
Drag options to blanks, or click blank then click option'
A90
B10
C50
D100
Attempts:
3 left
💡 Hint
Common Mistakes
Assigning equal traffic to stable and canary.
5fill in blank
hard

Fill all three blanks to define a canary release function with parameters for version, traffic, and duration.

MLOps
def canary_release(version=[1], traffic=[2], duration=[3]):
    print(f"Deploying {version} with {traffic}% traffic for {duration}.")
Drag options to blanks, or click blank then click option'
A'v2'
B10
C'1h'
D'v1'
Attempts:
3 left
💡 Hint
Common Mistakes
Using wrong data types for parameters.