0
0
MLOpsdevops~10 mins

Model stages (staging, production, archived) 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 set the model stage to production.

MLOps
client.transition_model_version_stage(name="my_model", version=1, stage=[1])
Drag options to blanks, or click blank then click option'
A"testing"
B"archived"
C"staging"
D"production"
Attempts:
3 left
💡 Hint
Common Mistakes
Using "staging" instead of "production".
Using an invalid stage name like "testing".
2fill in blank
medium

Complete the code to archive the model version.

MLOps
client.transition_model_version_stage(name="my_model", version=2, stage=[1])
Drag options to blanks, or click blank then click option'
A"production"
B"archived"
C"staging"
D"active"
Attempts:
3 left
💡 Hint
Common Mistakes
Using "active" which is not a valid stage.
Confusing "archived" with "staging".
3fill in blank
hard

Fix the error in the code to set the model to staging.

MLOps
client.transition_model_version_stage(name="my_model", version=3, stage=[1])
Drag options to blanks, or click blank then click option'
A"staging"
B'production'
Cstaging
Dproduction
Attempts:
3 left
💡 Hint
Common Mistakes
Forgetting quotes around the stage name.
Using single quotes inconsistently.
4fill in blank
hard

Fill both blanks to create a dictionary mapping model stages to their descriptions.

MLOps
stage_descriptions = {"production": [1], "archived": [2]
Drag options to blanks, or click blank then click option'
A"Live model used in real applications"
B"Model is being tested"
C"Model is no longer active but saved"
D"Model under development"
Attempts:
3 left
💡 Hint
Common Mistakes
Mixing up descriptions for staging and archived.
Using descriptions for testing instead of production.
5fill in blank
hard

Fill all three blanks to filter model versions in staging and production stages.

MLOps
filtered_versions = [v for v in versions if v.stage in [1] and v.name [2] "my_model" and v.version [3] 1]
Drag options to blanks, or click blank then click option'
A["staging", "production"]
B==
C>=
D!=
Attempts:
3 left
💡 Hint
Common Mistakes
Using wrong comparison operators.
Not using a list for stages.