Databricks Machine Learning Associate Question 471
Single answerYou are working on a Databricks project and need to register a trained machine learning model into the Unity Catalog model registry using the MLflow Client API. Which function should be used to specify the registry URI for the Unity Catalog?
- A
mlflow.set_registry_uri('databricks-uc')
- B
mlflow.set_tracking_uri('databricks-uc')
- C
mlflow.set_registry_uri('databricks:///models')
- D
mlflow.register_model('databricks:///models')
Show answer and explanation
Correct answer: C
Explanation
To register a model into Unity Catalog using the MLflow Client API, you need to specify the Unity Catalog model registry URI. The correct format for the registry URI is 'databricks:///models', and this is set using the mlflow.set_registry_uri() function. This ensures that MLflow operations are directed to the Unity Catalog registry.
- A. Incorrect.
This option is incorrect. 'databricks-uc' is not a valid registry URI. The correct URI format for Unity Catalog is 'databricks:///models'.
- B. Incorrect.
This option is incorrect. The function mlflow.set_tracking_uri() is used to set the tracking server URI, not the model registry URI.
- C. Correct.
This option is correct. The function mlflow.set_registry_uri('databricks:///models') is used to set the registry URI for Unity Catalog in Databricks.
- D. Incorrect.
This option is incorrect. mlflow.register_model() is used to register a model but does not set the registry URI.