0
0
MLOpsdevops~10 mins

MLflow Model Registry 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 register a model in MLflow Model Registry.

MLOps
mlflow.register_model(model_uri, [1])
Drag options to blanks, or click blank then click option'
Amodel_version
Brun_id
Cmodel_name
Dartifact_path
Attempts:
3 left
💡 Hint
Common Mistakes
Using model_version instead of model_name
Confusing run_id with model_name
2fill in blank
medium

Complete the code to transition a model version to 'Production' stage.

MLOps
client.transition_model_version_stage(name, version, [1])
Drag options to blanks, or click blank then click option'
ANone
BArchived
CStaging
DProduction
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'Archived' instead of 'Production'
Using 'None' which is invalid
3fill in blank
hard

Fix the error in the code to fetch the latest model version in 'Staging' stage.

MLOps
latest_version = client.get_latest_versions(name, [1])[0]
Drag options to blanks, or click blank then click option'
Astages=['Archived']
Bstages=['Staging']
Cstages=['Production']
Dstages=['None']
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'Production' instead of 'Staging'
Using 'None' which is invalid
4fill in blank
hard

Fill both blanks to create a dictionary of model versions and their stages for a registered model.

MLOps
versions = {v.version: v.[1] for v in client.get_latest_versions([2])}
Drag options to blanks, or click blank then click option'
Acurrent_stage
Bmodel_name
Cname
Dstage
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'stage' instead of 'current_stage'
Using 'model_name' instead of 'name' in the method call
5fill in blank
hard

Fill all three blanks to update the description of a specific model version.

MLOps
client.update_model_version(name=[1], version=[2], description=[3])
Drag options to blanks, or click blank then click option'
A"MyModel"
B3
C"Updated description for version 3"
D"NewModel"
Attempts:
3 left
💡 Hint
Common Mistakes
Using a wrong model name string
Passing version as a string instead of an integer
Not quoting the description string