Skip to content

Machine Learning Associate · Domain 1: Databricks Machine Learning · 38% of the exam

Task 1.5: Register a model using the MLflow Client API in the Unity Catalog registry; Identify benefits of registering models in the Unity Catalog registry over the workspace registry; Identify scenarios where promoting code is preferred over promoting models and vice versa; Set or remove a tag for a model; Promote a challenger model to a champion model using aliases

Registering three-level-named models, privileges and cross-workspace access, deploy code versus deploy models, registered model and version tags, and moving the Champion alias to a validated Challenger.

Study it

  • Models in Unity Catalog: registering, tags, aliases and promotion

    Lesson coming

Sample questions

Try each one before opening the answer. Every option is explained, with the Databricks documentation page that proves it.

Question 1 · choose 1

A data scientist runs mlflow.sklearn.log_model(model, name="model", registered_model_name="ml.churn.churn_classifier") to create a new registered model in Unity Catalog. She holds USE CATALOG on ml and USE SCHEMA and SELECT on ml.churn, and the registration fails with a permission error. Which grant lets her create the registered model?

  1. ACREATE MODEL on the schema ml.churn
  2. BEXECUTE on ml.churn.churn_classifier
  3. CCREATE TABLE on the schema ml.churn
  4. DMODIFY on the schema ml.churn
Show the answer and why
  • ACREATE MODEL on the schema ml.churn

    Correct

    Creating a registered model needs CREATE MODEL on the schema, together with the USE SCHEMA and USE CATALOG privileges she already has.

  • BEXECUTE on ml.churn.churn_classifier

    Incorrect

    EXECUTE lets a user load or view an existing registered model; it does not allow creating one.

  • CCREATE TABLE on the schema ml.churn

    Incorrect

    CREATE TABLE covers tables; registered models need the CREATE MODEL privilege.

  • DMODIFY on the schema ml.churn

    Incorrect

    MODIFY is not among the privileges that creating a registered model requires.

To create a new registered model in Unity Catalog you need CREATE MODEL (or CREATE FUNCTION) on the schema plus USE SCHEMA and USE CATALOG on the schema and catalog; privileges on an existing model, such as EXECUTE, do not cover creating a new one.

Question 2 · choose 2

A team is moving from the Workspace Model Registry (legacy) to Models in Unity Catalog. Data scientists in a development workspace must be able to load production model versions for comparison, and reviewers want to see which tables each model version was trained on. Which two capabilities of Models in Unity Catalog meet these needs? (Choose TWO.)

  1. AStage transitions that move a model version to Production
  2. BRegistry webhooks that fire when a new model version is created
  3. CAccess to a model from any workspace attached to the metastore that holds it, given the right privileges
  4. DEmail notifications when a model version changes
  5. ELineage from a model version to the tables recorded with mlflow.log_input, shown on its Lineage tab
Show the answer and why
  • AStage transitions that move a model version to Production

    Incorrect

    Stages are not supported for models in Unity Catalog.

  • BRegistry webhooks that fire when a new model version is created

    Incorrect

    Webhooks are not supported for models in Unity Catalog.

  • CAccess to a model from any workspace attached to the metastore that holds it, given the right privileges

    Correct

    Models in Unity Catalog can be used from every workspace attached to their metastore, for example prod models from a dev workspace.

  • DEmail notifications when a model version changes

    Incorrect

    Email notifications are not supported for models in Unity Catalog.

  • ELineage from a model version to the tables recorded with mlflow.log_input, shown on its Lineage tab

    Correct

    Table-to-model lineage is saved when the model is registered and appears on the Lineage tab of the model version page.

Models in Unity Catalog extend Unity Catalog governance to ML models: access from any workspace attached to the metastore and lineage to the upstream tables recorded with mlflow.log_input. Stages, webhooks and email notifications belong to the legacy Workspace Model Registry and are not supported in Unity Catalog, where aliases and the three-level namespace take the place of stages.

Question 3 · choose 1

A document classification model takes three days of GPU time to train. The staging environment has GPU compute and read access to the full production data; the development environment cannot read production data, and policy forbids copying it there; the production environment has no GPU compute. The production model must be trained on the full production dataset with reviewed and tested code. Which deployment approach fits?

  1. ADeploy code: promote the reviewed training code through staging, and the release then trains the final model in production
  2. BDeploy models: train in development and promote the trained model through staging to production
  3. CDeploy the code to staging, train the model there on the full production data, then deploy the model to production
  4. DDeploy code and train in production on a small sample of the data so that CPU compute can finish the training
Show the answer and why
  • ADeploy code: promote the reviewed training code through staging, and the release then trains the final model in production

    Incorrect

    In the deploy code pattern the final model is trained in the production environment, which has no GPU compute here.

  • BDeploy models: train in development and promote the trained model through staging to production

    Incorrect

    Deploy models is not viable when production data is not accessible from the development environment.

  • CDeploy the code to staging, train the model there on the full production data, then deploy the model to production

    Correct

    This hybrid approach trains once in staging over the full production dataset with tested code and promotes the resulting model.

  • DDeploy code and train in production on a small sample of the data so that CPU compute can finish the training

    Incorrect

    The model must be trained on the full production dataset, which a sample does not give.

Databricks recommends deploying code in most situations, with the final model trained in production. When the model must be trained in staging over the full production dataset, a hybrid approach deploys the code to staging, trains there and deploys the model to production; it saves training cost in production but adds operation cost in staging. Deploying models from development needs production data in development.

Question 4 · choose 1

A validation job tests version 7 of prod.ml_team.churn and must record validation_status = PASSED on that version only. A weekly report must later list every version of the model whose validation_status is PASSED. Which approach works with Models in Unity Catalog?

  1. ACall set_registered_model_tag with validation_status = PASSED, and have the report search versions with the filter tags.validation_status = 'PASSED'
  2. BCall set_model_version_tag on version 7, and have the report list the model's versions with search_model_versions and check each version's tags
  3. CCall set_model_version_tag on version 7, and have the report search versions with the filter tags.validation_status = 'PASSED'
  4. DAssign an alias named PASSED to each version that passes, and have the report read the alias
Show the answer and why
  • ACall set_registered_model_tag with validation_status = PASSED, and have the report search versions with the filter tags.validation_status = 'PASSED'

    Incorrect

    A registered model tag labels the whole model, not version 7, and tag-based filters are not supported in search_model_versions.

  • BCall set_model_version_tag on version 7, and have the report list the model's versions with search_model_versions and check each version's tags

    Correct

    A model version tag labels just that version, and scanning the versions returned by a supported name filter avoids the unsupported tag filter.

  • CCall set_model_version_tag on version 7, and have the report search versions with the filter tags.validation_status = 'PASSED'

    Incorrect

    Tag-based filters are not supported in search_model_versions for models in Unity Catalog.

  • DAssign an alias named PASSED to each version that passes, and have the report read the alias

    Incorrect

    An alias is a named reference to one version, so assigning it to a newer version moves it away from the earlier one.

Tags on models in Unity Catalog can be set on the registered model (set_registered_model_tag) or on a single version (set_model_version_tag). search_model_versions for Unity Catalog models does not support tag-based filters, so Databricks suggests calling the search API with supported filters, such as the model name, and scanning the results.

Question 5 · choose 1

A deployment job promotes a validated version of prod.ml_team.churn with set_registered_model_alias(name, "Champion", 12). The nightly batch job, which loads models:/prod.ml_team.churn@Champion, scores with version 12 on its next run, but the Model Serving endpoint for the same model still serves version 11. What should the deployment job do?

  1. ANothing, because the endpoint moves to whichever version holds the Champion alias on its own within a few minutes
  2. BDelete the Champion alias and set it again so that the endpoint is notified of the change
  3. CGet the version with get_model_version_by_alias and update the endpoint's served entity to that version
  4. DAssign the Champion alias to version 12 again from Catalog Explorer instead of the API
Show the answer and why
  • ANothing, because the endpoint moves to whichever version holds the Champion alias on its own within a few minutes

    Incorrect

    An endpoint serves the model version in its configuration; changing the alias does not update that configuration.

  • BDelete the Champion alias and set it again so that the endpoint is notified of the change

    Incorrect

    Resetting the alias changes only the alias; nothing notifies the endpoint, and registry webhooks are not supported in Unity Catalog.

  • CGet the version with get_model_version_by_alias and update the endpoint's served entity to that version

    Correct

    Deployment workflows get the version by alias and then update the endpoint to serve that version.

  • DAssign the Champion alias to version 12 again from Catalog Explorer instead of the API

    Incorrect

    Setting the alias in the UI has the same effect as the API call and does not change the endpoint's configuration.

Batch and streaming jobs that load models:/<name>@Champion pick up a reassigned alias on their next run. A Model Serving endpoint is configured with a model name and version, so a deployment workflow gets the version by alias (get_model_version_by_alias) and updates the endpoint to serve that version.

Question 6 · choose 1

In a workspace whose default catalog is not in Unity Catalog, a data scientist logs a model with registered_model_name to register it in Unity Catalog. Which name must she pass?

  1. AThe model name only, such as churn_model
  2. BThe three-level name ml.churn.churn_model
  3. CThe schema and model, such as churn.churn_model
  4. DThe workspace path of the training notebook
Show the answer and why
  • AThe model name only, such as churn_model

    Incorrect

    A bare name works only when the default catalog is in Unity Catalog.

  • BThe three-level name ml.churn.churn_model

    Correct

    Registering to Unity Catalog uses the <catalog>.<schema>.<model> name.

  • CThe schema and model, such as churn.churn_model

    Incorrect

    Unity Catalog models need the catalog level as well.

  • DThe workspace path of the training notebook

    Incorrect

    Registered models are named in Unity Catalog, not by notebook path.

Using registered_model_name in log_model registers the model to Unity Catalog, so you provide the full three-level name <catalog>.<schema>.<model>. Only when the workspace's default catalog is in Unity Catalog can a bare model name be used, with the default catalog and schema inferred.

Question 7 · choose 1

A small team does all of its ML work in a single Databricks workspace and does not use external Git repos or a CI/CD process. Which deployment pattern does Databricks suggest considering?

  1. ADeploy models: train once and promote the model artifact
  2. BDeploy code through a CI/CD pipeline that it would first have to build
  3. CRetrain the model by hand in each environment
  4. DCopy notebooks between three separate workspaces
Show the answer and why
  • ADeploy models: train once and promote the model artifact

    Correct

    Databricks lists a single workspace and no external repos or CI/CD as reasons to consider deploying models.

  • BDeploy code through a CI/CD pipeline that it would first have to build

    Incorrect

    The guidance for teams without external repos or CI/CD points to deploying models.

  • CRetrain the model by hand in each environment

    Incorrect

    Neither documented pattern relies on manual retraining in each environment.

  • DCopy notebooks between three separate workspaces

    Incorrect

    The team works in a single workspace; Databricks maps environments to catalogs.

Databricks recommends deploying code in most situations, but suggests considering deploying models when training is very expensive or hard to reproduce, when all work happens in a single workspace, or when the team does not work with external repos or a CI/CD process.

Question 8 · choose 1

The registered model prod.ml_team.iris_model carries the tag task = classification, which is no longer accurate. Which MLflow client call removes that tag from the registered model?

  1. Aclient.delete_registered_model("prod.ml_team.iris_model")
  2. Bclient.set_registered_model_tag("prod.ml_team.iris_model", "task", "")
  3. Cclient.delete_registered_model_tag("prod.ml_team.iris_model", "task")
  4. Dclient.update_registered_model("prod.ml_team.iris_model", description="")
Show the answer and why
  • Aclient.delete_registered_model("prod.ml_team.iris_model")

    Incorrect

    This deletes the whole registered model, not just its tag.

  • Bclient.set_registered_model_tag("prod.ml_team.iris_model", "task", "")

    Incorrect

    This sets the tag to an empty value instead of removing it.

  • Cclient.delete_registered_model_tag("prod.ml_team.iris_model", "task")

    Correct

    delete_registered_model_tag removes a tag from the registered model.

  • Dclient.update_registered_model("prod.ml_team.iris_model", description="")

    Incorrect

    This changes the model's description, not its tags.

Tags are key-value pairs that label and categorize registered models. For a registered model, the MLflow client sets a tag with set_registered_model_tag and removes it with delete_registered_model_tag.

Question 9 · choose 1

A data scientist has EXECUTE on prod.ml_team.churn and USE privileges on its schema and catalog, but her call to set_registered_model_alias fails with a permission error. What does setting an alias require?

  1. ASELECT on the schema
  2. BOwnership of the registered model, plus USE SCHEMA and USE CATALOG
  3. CMODIFY on the registered model
  4. DWorkspace admin rights
Show the answer and why
  • ASELECT on the schema

    Incorrect

    SELECT is not the privilege that governs aliases on a model.

  • BOwnership of the registered model, plus USE SCHEMA and USE CATALOG

    Correct

    Setting, updating or deleting aliases requires being the owner of the registered model.

  • CMODIFY on the registered model

    Incorrect

    Alias changes are tied to ownership of the registered model, not to MODIFY.

  • DWorkspace admin rights

    Incorrect

    Alias permissions follow Unity Catalog ownership of the model.

To set, update or delete aliases on a model in Unity Catalog, you must be the owner of the registered model and hold USE SCHEMA and USE CATALOG on its schema and catalog. To share write access, grant ownership of the model to a group.

Question 10 · choose 1

With MLflow 3, a LoggedModel that has metrics and parameters from training and evaluation is registered to Unity Catalog as a model version. Where can reviewers in other workspaces see that performance data?

  1. AOnly in the experiment of the workspace that trained the model
  2. BOnly in a CSV downloaded from the experiment page
  3. COn the model version page in Unity Catalog, in any workspace
  4. DIn the Workspace Model Registry's stage history
Show the answer and why
  • AOnly in the experiment of the workspace that trained the model

    Incorrect

    MLflow 3 surfaces the LoggedModel's data on the Unity Catalog model version, across workspaces.

  • BOnly in a CSV downloaded from the experiment page

    Incorrect

    The data is shown on the model version page and available through the REST API.

  • COn the model version page in Unity Catalog, in any workspace

    Correct

    When a LoggedModel is promoted to a Unity Catalog model version, its performance data becomes visible on the version page across workspaces.

  • DIn the Workspace Model Registry's stage history

    Incorrect

    The legacy registry is not involved; the data appears on the Unity Catalog model version.

MLflow 3 LoggedModels capture metrics, parameters and traces across development phases and environments. When a LoggedModel is promoted to Unity Catalog as a model version, its performance data is visible on the model version page, and through the REST API, across all workspaces and experiments.

Question 11 · choose 1

A team wants to remove the Challenger alias from prod.ml_team.churn after a failed comparison, without deleting any model version. Which MLflow client call does that?

  1. Aclient.delete_registered_model_alias("prod.ml_team.churn", "Challenger")
  2. Bclient.delete_model_version("prod.ml_team.churn", "Challenger")
  3. Cclient.update_model_version("prod.ml_team.churn", "3", description="")
  4. Dclient.delete_registered_model("prod.ml_team.churn") and register it again
Show the answer and why
  • Aclient.delete_registered_model_alias("prod.ml_team.churn", "Challenger")

    Correct

    delete_registered_model_alias removes the alias from the registered model.

  • Bclient.delete_model_version("prod.ml_team.churn", "Challenger")

    Incorrect

    This deletes a model version, which the team wants to keep.

  • Cclient.update_model_version("prod.ml_team.churn", "3", description="")

    Incorrect

    This edits version 3's description; the alias stays where it is.

  • Dclient.delete_registered_model("prod.ml_team.churn") and register it again

    Incorrect

    This deletes the whole registered model.

Aliases are mutable, named references to model versions. The MLflow client creates or reassigns them with set_registered_model_alias and removes them with delete_registered_model_alias; deleting an alias leaves the versions in place.

Practice domain 1 →Practice all domains →