Databricks Machine Learning Associate Question 470
Select 4You are training a machine learning model and want to register it in the Unity Catalog registry using the MLflow Client API. Which of the following steps are required to successfully register the model in the Unity Catalog registry?
- A
Set the model registry URI to the Unity Catalog registry using the MLflow Client.
- B
Ensure that the Unity Catalog is enabled for your Databricks workspace.
- C
Use the
log_model()method to directly save the model to the Unity Catalog registry. - D
Use the
create_registered_model()method of the MLflow Client API to create a registered model entry in Unity Catalog. - E
Provide the appropriate catalog and schema name when registering the model in Unity Catalog.
Show answer and explanation
Correct answers: A, B, D, E
Explanation
To register a model in the Unity Catalog registry using the MLflow Client API, you must first set the model registry URI to Unity Catalog (databricks-uc) and ensure Unity Catalog is enabled in your workspace. Then, you use the create_registered_model() method to create an entry in the registry, while specifying the catalog and schema to correctly organize the registered model. Logging with log_model() alone is insufficient for registration in Unity Catalog.
- A. Correct.
Correct. To use the Unity Catalog registry, you must set the model registry URI to point to Unity Catalog (e.g.,
databricks-uc). This allows MLflow to interact with the Unity Catalog registry. - B. Correct.
Correct. Unity Catalog must be enabled in your Databricks workspace to use it as a registry for MLflow models.
- C. Incorrect.
Incorrect. The
log_model()method is used to log models to an experiment or a specific location, but it does not directly register the model in Unity Catalog. - D. Correct.
Correct. The
create_registered_model()method of the MLflow Client API is used to create an entry for the model in the registry when working with Unity Catalog. - E. Correct.
Correct. When registering a model in Unity Catalog, you must specify the catalog and schema name to ensure the model is registered in the correct location.