How do you register a run's model in the Unity Catalog registry using the MLflow Client?
- Exam domain
- Databricks Machine Learning36% of the exam
- Difficulty
- Medium
- In this mock
- 18 questions on this domainPractise this domain
Why the exam asks this
Databricks Machine Learning (36% of the exam)
Objective in the exam guide: Register a model using the MLflow Client API in the Unity Catalog registry
Registering with the Client API in Unity Catalog is named.
Why B is the answer
Use registry URI databricks-uc and create_model_version with catalog.schema.model
Unity Catalog models use three-level names. With the registry URI set to databricks-uc, create_model_version (after the registered model exists) adds a version from the run.
Remember: Three-level names in databricks-uc.
How it works
Unity Catalog registry uses three-level names.
In detail
- Registry URI databricks-uc.
- catalog.schema.model names.
Every option, checked
Knowing why each wrong option fails is how you rule it out on exam day.
A. client.set_tag("registry", "uc")Wrong
Tags do not register models.
B. Use registry URI databricks-uc and create_model_version with catalog.schema.modelRight
Three-level names in databricks-uc.
C. client.create_registered_model("churn") with a one-part name in the workspace registryWrongMost tempting
One-part names are the legacy workspace registry.
Why it tempts: It is the older workspace registry pattern.
D. client.log_model("churn")Wrong
The client has no log_model.
Use case
An illustrative scenario, not a real incident.
Illustrative: the best run becomes version 7 of main.ml.churn.
See it in different ways
sequenceDiagram participant P0 as Script participant P1 as MlflowClient participant P2 as Unity Catalog P0->>P1: set_registry_uri databricks-uc P0->>P1: create_model_version main.ml.churn P1->>P2: version 1
How to read this chart
- 1. Script sends "set_registry_uri databricks-uc" to MlflowClient.
- 2. Script sends "create_model_version main.ml.churn" to MlflowClient.
- 3. MlflowClient sends "version 1" to Unity Catalog.
flowchart LR S0["Set registry URI"] --> S1["create_registered_model once"] --> S2["create_model_version"] --> S3["Set alias"]
How to read this chart
- Read it in order: Set registry URI, then create_registered_model once, then create_model_version, then Set alias.