What you will be able to do
- Configure the MLflow client so that registrations go to Unity Catalog and not to the legacy workspace registry
- List the compute, privilege and signature requirements that must be met before registering a model in Unity Catalog
- Register a model version with mlflow.register_model using a three-level catalog.schema.model name and the correct model URI for MLflow 2.x or MLflow 3
- Register a model while logging it by using registered_model_name, and through the experiment run page UI
- Explain why the catalog a model is registered in describes governance, not deployment status
Key concept
Three-level model name — In Unity Catalog, a registered model is addressed as <catalog>.<schema>.<model>, the same namespace used for tables. Every MLflow API call that registers or loads a Unity Catalog model needs this full name.
1.Pointing the MLflow client at Unity Catalog
Databricks offers two model registries. The legacy Workspace Model Registry belongs to a single workspace. Models in Unity Catalog is a hosted MLflow Model Registry that brings Unity Catalog governance to models: centralized access control, auditing, lineage, and model discovery across workspaces. It also works with the open-source MLflow Python client, so the calls you use to register a model are the standard MLflow ones. The only question is which registry those calls reach.
The target registry is controlled by the registry URI. If the workspace's default catalog is in Unity Catalog, and you are on a cluster running Databricks Runtime 13.3 LTS or above or you are using MLflow 3, models are created in and loaded from that default catalog automatically. MLflow 3 also changes the default registry URI to databricks-uc. In every other case you set the URI yourself at the top of the notebook. The reverse also applies: a team that wants to stay on the legacy registry sets the URI to databricks.
import mlflow
mlflow.set_registry_uri("databricks-uc")Checkpoint 1 of 8· Fill the gap
Which registry URI value sends MLflow registrations to Unity Catalog?
import mlflow
mlflow.set_registry_uri(" ? ")databricks-uc selects the Unity Catalog registry. databricks selects the legacy Workspace Model Registry.
2.What must be in place before you register
Pointing the client at Unity Catalog is necessary but not enough. A registration in Unity Catalog has to pass three gates: the compute, the caller's privileges, and the model itself.
Compute. The cluster must have access to Unity Catalog. For ML workloads, that means Dedicated access mode (formerly single user). On Databricks Runtime 15.4 LTS ML and above, dedicated group access mode also works. Databricks Runtime 13.2 ML and above includes support for models in Unity Catalog. On Databricks Runtime 11.3 LTS and above, you can get it by installing the latest MLflow client with %pip install --upgrade "mlflow-skinny[databricks]".
Privileges. A registered model is a Unity Catalog securable, so the normal catalog and schema privileges apply. Creating a new registered model and adding a version to an existing one need different privileges:
| Action | Additional privilege required |
|---|---|
| Create a new registered model | CREATE MODEL |
| Create a new model version | Owner of the registered model, or CREATE MODEL VERSION on it |
| Load or deploy a model | EXECUTE on the registered model |
| Set an alias on a registered model | Owner of the registered model |
Checkpoint 2 of 8· Check yourself
A data scientist does not own the registered model prod.ml_team.iris_model but needs to register a new version of it. What do they need?
A non-owner needs CREATE MODEL VERSION on the model, plus USE SCHEMA and USE CATALOG. CREATE MODEL is for creating a brand-new registered model, and EXECUTE is for loading or deploying one.
“you must be the owner of the registered model, or have the CREATE MODEL VERSION privilege on it”Source: docs.databricks.com
Signature. Every new model version in Unity Catalog must have a model signature. You can get one in either of two ways. Databricks autologging logs models with signatures automatically for many popular frameworks. With MLflow 2.5.0 and above, you can pass an input_example to mlflow.<flavor>.log_model, and MLflow infers the signature from it.
If you hit authorization errors during registration, the docs suggest setting the environment variable MLFLOW_USE_DATABRICKS_SDK_MODEL_ARTIFACTS_REPO_FOR_UC to True. On AWS GovCloud this setting is mandatory.
With a signature, model inputs are checked at inference time and mismatched inputs raise an error. Without one, nothing enforces the input format, AI functions need a schema in every call, and Model Serving does not auto-generate input examples.
Checkpoint 3 of 8· Exam question
Which statement correctly describes model version numbers for a registered model in the Unity Catalog Model Registry?
Correct answer: A — Version numbers are assigned automatically starting at 1, increment monotonically with each new registration, and cannot be changed or reused once created.
- A. Unity Catalog assigns model version numbers automatically and increments them monotonically with every new registration against that registered model, and existing version numbers are immutable and never reused.
- B. Promoting a model to a `prod` catalog in Unity Catalog is typically done by registering a new version under a differently named model in that catalog, and the version numbering of that new registered model starts fresh independently rather than being tied to a reset of the source model's sequence.
- C. `register_model` does not accept a version number argument; the registry always computes the next version number itself, so manual numbering to match a release schedule is not supported.
- D. Deleting a model version removes that version but does not free its number for reuse; the registry's internal counter continues to advance rather than filling in deleted numbers.
Sources1
3.Registering a logged model with mlflow.register_model
Once the prerequisites are met, registration is a single call. The docs call it the MLflow Client API register_model() method. It takes two arguments: a URI that points at a model you have already logged, and the three-level name of the registered model in Unity Catalog that the new version belongs to. The URI format depends on your MLflow major version, because MLflow 3 tracks models as first-class LoggedModel objects with their own IDs. MLflow 2.x addresses a model as an artifact path inside a run.
| MLflow version | Source URI form | Example call |
|---|---|---|
| MLflow 3 | models:/<model_id> | mlflow.register_model("models:/<model_id>", "prod.ml_team.iris_model") |
| MLflow 2.x | runs:/<run_id>/model | mlflow.register_model("runs:/<run_id>/model", "prod.ml_team.iris_model") |
In a notebook you seldom type the ID by hand. In MLflow 3, mlflow.last_logged_model() returns the model you just logged, and its model_uri is ready to pass in. In MLflow 2.x, you build the runs:/ URI from the last active run, as the autologging example below shows.
autolog_run = mlflow.last_active_run()
model_uri = "runs:/{}/model".format(autolog_run.info.run_id)
mlflow.register_model(model_uri, "prod.ml_team.iris_model")You do not have to create the registered model first. If the name does not exist, register_model creates the registered model and then adds the version to it. The caller still needs CREATE MODEL on the schema for that first registration. With MLflow 3 there is an extra benefit: the new version carries all the parameters and metrics logged with the source LoggedModel, and that performance data appears on the Unity Catalog model version page across all workspaces and experiments.
Checkpoint 4 of 8· Check yourself
A caller with the right privileges runs mlflow.register_model(logged_model.model_uri, "prod.ml_team.iris_model"), and no model by that name exists in the ml_team schema. What happens?
register_model creates the registered model when it does not already exist. A separate creation step is not required.
“The registered model will be created if it doesn't already exist”Source: docs.databricks.com
Checkpoint 5 of 8· Exam question
A data scientist trains a scikit-learn model in a Databricks notebook attached to a workspace whose default catalog is not configured for Unity Catalog. They plan to register the model directly into the Unity Catalog model `prod.ml_team.churn_model` using `mlflow.register_model`. Before calling `register_model`, what must they configure so the call targets the Unity Catalog registry instead of the legacy workspace registry?
Correct answer: A — Call `mlflow.set_registry_uri("databricks-uc")` before registering, so the client resolves the three-level model name against Unity Catalog instead of the workspace registry.
- A. Setting the MLflow registry URI to `databricks-uc` tells the client to interpret the three-level name as a Unity Catalog model and route registration calls there. Without it, `register_model` defaults to the workspace model registry and the three-level name will not resolve correctly.
- B. Cluster-level `CAN_MANAGE` permission controls who can administer compute resources; it has no bearing on which model registry `register_model` targets. Registry routing is controlled by the MLflow registry URI, not a cluster permission.
- C. There is no such Spark configuration flag that redirects MLflow registration calls; Unity Catalog access is governed by the catalog/schema being enabled and the MLflow registry URI setting, not a cluster-level Spark property.
- D. Models registered in the legacy workspace registry are separate objects from Unity Catalog models and are not automatically migrated by a later admin action tied to this registration call. The registry target must be set before the registration call, not fixed afterward.
4.Registering at log time, and from the UI
register_model is a separate step after logging. You can also log and register in one go by passing registered_model_name to the flavor's log_model call. The Unity Catalog naming rule still applies here: registered_model_name must be the full three-level name. The example below also covers the signature requirement from earlier. It passes the first training row as input_example, and MLflow infers the signature from that row and the model's prediction on it.
with mlflow.start_run():
# Train a sklearn model on the iris dataset
X, y = datasets.load_iris(return_X_y=True, as_frame=True)
clf = RandomForestClassifier(max_depth=7)
clf.fit(X, y)
# Take the first row of the training dataset as the model input example.
input_example = X.iloc[[0]]
# Log the model and register it as a new version in UC.
mlflow.sklearn.log_model(
sk_model=clf,
name="model",
# The signature is automatically inferred from the input example and its predicted output.
input_example=input_example,
# Use three-level name to register model in Unity Catalog.
registered_model_name="prod.ml_team.iris_model",
)MLflow 2.x uses artifact_path="model" where MLflow 3 uses name="model". Everything else, including input_example and registered_model_name="prod.ml_team.iris_model", is the same.
Checkpoint 6 of 8· Exam question
A workspace administrator with full workspace admin rights repeatedly gets a permission-denied error when running `mlflow.register_model(model_uri, "ops.ml.models.fraud_detector")` against the `ops.ml.models` schema. What privilege must be granted for the registration to succeed?
Correct answer: A — Grant `CREATE MODEL` on the `ops.ml.models` schema in addition to `USE CATALOG` and `USE SCHEMA`, since workspace admin rights do not carry Unity Catalog object privileges.
- A. Unity Catalog privileges are separate from workspace admin rights, so registering a model requires `USE CATALOG` and `USE SCHEMA` to traverse the namespace plus `CREATE MODEL` on the schema to create the object itself. Missing any of these three produces a permission-denied error regardless of workspace-level roles.
- B. Metastore admin is a broad administrative role for managing the metastore itself; it is not the minimal privilege intended for day-to-day model registration and is not required just to create a registered model in a schema the user should already have scoped access to.
- C. Cluster compute permissions govern who can attach to or manage a cluster; they do not grant or restrict access to Unity Catalog securable objects like schemas or registered models.
- D. Catalog-level `MODIFY` alone does not substitute for the schema-level `CREATE MODEL` privilege needed to create a new registered model object inside a specific schema; the schema-level grant is still required.
You can also register without code. On the experiment run page, the Register model button opens a dialog where you choose Unity Catalog as the destination and pick the target model. Registration is not instant, so you may need to refresh the destination model in Unity Catalog until the new version appears.
Checkpoint 7 of 8· Put it in order
Put the steps for registering a run's model to Unity Catalog from the UI in order.
- 1.In the dialog, select Unity Catalog and choose a destination model from the drop-down list
- 2.Click Register
- 3.Open the experiment run page and click Register model in the upper-right corner
- 4.Navigate to the destination model in Unity Catalog and refresh periodically to monitor progress
The flow starts on the run page, sets Unity Catalog as the destination in the dialog, and submits. Registration can take time, so you then check progress on the destination model.
“From the experiment run page, click Register model in the upper-right corner of the UI.”Source: docs.databricks.com
Sources1
5.What the three-level name does and does not tell you
All the examples register into prod.ml_team, which raises an obvious question: is version 2 of prod.ml_team.iris_model now serving production traffic? Not necessarily. The catalog, schema and registered model a version sits in describe its environment and the governance rules attached to it. For example, privileges can be set so that only admins can delete from the prod catalog. They do not describe its deployment status. Deployment status is tracked separately with model aliases, which belong to a later lesson on promotion. For registration, the takeaway is that choosing the catalog is a governance decision.
Checkpoint 8 of 8· Check yourself
A new version has just been registered as prod.ml_team.iris_model. Which statement is accurate?
The enclosing catalog reflects environment and governance, not deployment. Deployment status is managed with model aliases.
“Using the prod catalog doesn't necessarily mean that the model version serves production traffic.”Source: docs.databricks.com
One more registration path uses an MlflowClient instance directly. Some versions already live in the legacy Workspace Model Registry. To bring them into Unity Catalog, Databricks recommends copy_model_version() with MLflow client 3.4.0 or later. The client points at the workspace registry as the source, and the destination is a three-level Unity Catalog name. Like register_model, the call creates the destination model if it does not exist.
import mlflow
from mlflow import MlflowClient
# Registry must be set to workspace registry
mlflow.set_registry_uri("databricks")
client = MlflowClient(registry_uri="databricks")
src_model_uri = f"models:/my_wmr_model/1"
uc_migrated_copy = client.copy_model_version(
src_model_uri, "mycatalog.myschema.my_uc_model"
)You can add a signature by following the MLflow documentation. Or, only with copy_model_version on MLflow 3.4.0 or later, you can set MLFLOW_SKIP_SIGNATURE_CHECK_FOR_UC_REGISTRY_MIGRATION to "true". Versions copied without a signature still have the usual limitations: no input enforcement, a schema is required for AI functions, and Model Serving does not auto-generate input examples.
Exam traps
Each one states something that sounds right. Open it to see what is actually true.
1.Calling mlflow.register_model on Databricks always registers to Unity Catalog.Why is that wrong?
That is only automatic when the workspace's default catalog is in Unity Catalog (on DBR 13.3 LTS+ or MLflow 3). Otherwise the client writes to the workspace model registry unless you call mlflow.set_registry_uri("databricks-uc").
Covered in Pointing the MLflow client at Unity Catalog
2.A model signature is optional when registering to Unity Catalog, just as it was in the workspace registry.Why is that wrong?
Every new model version in Unity Catalog must have a signature. Get one from autologging, or by passing input_example to log_model on MLflow 2.5.0+.
Covered in What must be in place before you register
3.registered_model_name in log_model can be a short name such as "iris_model", because only register_model needs the full path.Why is that wrong?
Passing registered_model_name to log_model also registers to Unity Catalog, so it needs the full catalog.schema.model name too.
Covered in Registering at log time, and from the UI
4.Registering a version under the prod catalog puts it into production.Why is that wrong?
The catalog reflects environment and governance rules, not deployment status. Deployment status is managed with model aliases.
Covered in What the three-level name does and does not tell you
Sources
Every claim above is drawn from one of these pages, quoted as it was written on the date shown.
- 1.
“Models in Unity Catalog extends the benefits of Unity Catalog to ML models, including centralized access control, auditing, lineage, and model discovery across workspaces.”
↩︎ Pointing the MLflow client at Unity Catalog“The default registry URI in MLflow 3 is databricks-uc, meaning the MLflow Model Registry in Unity Catalog will be used.”
↩︎ Pointing the MLflow client at Unity Catalog“For ML workloads, this means that the compute's access mode must be Dedicated (formerly single user).”
↩︎ What must be in place before you register“Support for models in Unity Catalog is included in Databricks Runtime 13.2 ML and above.”
↩︎ What must be in place before you register“you need the CREATE MODEL and USE SCHEMA privileges on the enclosing schema, and USE CATALOG privilege on the enclosing catalog”
↩︎ What must be in place before you register“Without a signature, there is no automatic input enforcement, and models need to be able to handle unexpected inputs.”
↩︎ What must be in place before you register“To register a model, use MLflow Client API register_model() method.”
↩︎ Registering a logged model with mlflow.register_model“you can specify an input example in your mlflow.<flavor>.log_model call, and the model signature is automatically inferred.”
↩︎ Registering at log time, and from the UI“Registering a model can take time.”
↩︎ Registering at log time, and from the UI“Using the prod catalog doesn't necessarily mean that the model version serves production traffic.”
↩︎ What the three-level name does and does not tell you“pass the three-level name of the model to MLflow APIs, in the form <catalog>.<schema>.<model>.”
↩︎ Key concept“For other workspaces, the MLflow Python client creates models in the Databricks workspace model registry.”
↩︎ Exam trap 1“New ML model versions in UC must have a model signature.”
↩︎ Exam trap 2“using registered_model_name in the log_model() call registers the model to Unity Catalog, so you must provide the full three-level name of the model”
↩︎ Exam trap 3“To manage the deployment status, use model aliases.”
↩︎ Exam trap 4“For other workspaces, the MLflow Python client creates models in the Databricks workspace model registry.”
↩︎ Prediction“you must be the owner of the registered model, or have the CREATE MODEL VERSION privilege on it”
↩︎ Checkpoint“The registered model will be created if it doesn't already exist”
↩︎ Checkpoint“From the experiment run page, click Register model in the upper-right corner of the UI.”
↩︎ Checkpoint - 2.
“Use mlflow.set_registry_uri("databricks").”
↩︎ Pointing the MLflow client at Unity Catalog“all performance data from the original LoggedModel becomes visible on the UC Model Version page”
↩︎ Registering a logged model with mlflow.register_model - 3.https://docs.databricks.com/aws/en/mlflow/modelsOfficial docs
“To register a model using the API, use the following command:”
↩︎ Registering a logged model with mlflow.register_model - 4.https://docs.databricks.com/aws/en/machine-learning/manage-model-lifecycle/migrate-modelsOfficial docs
“If the destination model does not exist in Unity Catalog, it is created by this API call.”
↩︎ What the three-level name does and does not tell you