Complete the code to set the model stage to production.
client.transition_model_version_stage(name="my_model", version=1, stage=[1])
The stage parameter should be set to "production" to mark the model as ready for use.
Complete the code to archive the model version.
client.transition_model_version_stage(name="my_model", version=2, stage=[1])
Setting the stage to "archived" means the model version is no longer active but kept for records.
Fix the error in the code to set the model to staging.
client.transition_model_version_stage(name="my_model", version=3, stage=[1])
The stage value must be a string enclosed in quotes, so "staging" is correct.
Fill both blanks to create a dictionary mapping model stages to their descriptions.
stage_descriptions = {"production": [1], "archived": [2]The production stage means the model is live, and archived means it is saved but inactive.
Fill all three blanks to filter model versions in staging and production stages.
filtered_versions = [v for v in versions if v.stage in [1] and v.name [2] "my_model" and v.version [3] 1]
We check if the stage is in the list of stages, the name equals "my_model", and the version is greater or equal to 1.