Complete the code to deploy a new model version using a canary release.
deploy_model(version='v2', traffic_split=[1])
In canary releases, a small percentage of traffic (like 10%) is routed to the new model version first.
Complete the code to monitor the canary model's performance metric.
monitor_metric(model_version='v2', metric='latency', threshold=[1])
The threshold is set to 1.0 seconds latency to detect performance issues early.
Fix the error in the canary release rollout command.
rollout_canary(model='v2', traffic=[1], duration='1h')
The traffic parameter expects an integer percentage without quotes.
Fill both blanks to create a dictionary for traffic routing in canary release.
traffic_split = {'stable': [1], 'canary': [2]In canary releases, most traffic goes to stable (90%) and a small part to canary (10%).
Fill all three blanks to define a canary release function with parameters for version, traffic, and duration.
def canary_release(version=[1], traffic=[2], duration=[3]): print(f"Deploying {version} with {traffic}% traffic for {duration}.")
The function deploys version 'v2' with 10% traffic for 1 hour duration.