CertSafari
    Databricks Certified Machine Learning Associate· Lessons

    Domain 1 · Lesson 17/48

    Set and Remove Model Tags in Unity Catalog

    Set or remove a tag for a model

    15 min read
    2.08% of exam
    7 sources
    Published 2 Oct 2026
    Docs as of 30 Sep 2026

    What you will be able to do

    • Tell a registered-model tag apart from a model-version tag and pick the right one for a labelling need
    • Name the privileges needed to set or delete a tag on a model in Unity Catalog
    • Use the four MlflowClient methods that set and delete tags on registered models and model versions
    • Write tag keys and values that meet the platform-wide constraints, and know where the UI route is documented
    • Tell model tags apart from run, experiment and logged-model tags, and from the legacy Workspace Model Registry's tagging

    Key concept

    Two-level model tags — In Unity Catalog, a tag is a key-value label that sits either on the registered model as a whole or on one numbered version of it. Each level has its own set and delete methods, so you first decide which object the label describes, and then you know which call to make.

    1.What a model tag is, and the two places it can live

    A tag is a key-value pair you attach to a model so you can label and categorize it by function or status. The Unity Catalog documentation gives one example at each level. On the registered model, a tag with key task and value question-answering marks every model intended for question answering, and the UI shows it as task:question-answering. On a model version, a validation_status key tracks where that one version stands: validation_status:pending while it is going through pre-deployment validation, and validation_status:approved once it is cleared for deployment.

    The split follows from what each label describes. task describes the purpose of the whole model, and it stays true as new versions are trained. validation_status describes one trained artifact, and versions 3 and 4 of the same model can have different values. If you put a version-specific fact on the registered model, every version appears to share it. If you put a model-wide fact on one version, the other versions don't have it.

    Unity Catalog treats both levels as first-class taggable objects. Its general tagging page lists registered models and model versions separately among the securables that support tags, next to catalogs, schemas, tables and functions.

    The documentation's two tagging examples, side by side
    LevelExample keyExample valuesWhat it labels
    Registered modeltaskquestion-answering, classificationThe function of the model as a whole
    Model versionvalidation_statuspending, approvedThe status of one specific version

    Checkpoint 1 of 8· Check yourself

    You want to record that a model is meant for classification, whichever version is current. Which object should carry the task tag?

    Sources12

    2.Who is allowed to set or remove a tag

    Before you call any tagging method, check that you have the privileges. For tags on a Unity Catalog model, you need to be **the owner of the registered model, or hold the APPLY TAG privilege on it**. Either way, you also need USE SCHEMA on the containing schema and USE CATALOG on the containing catalog. The general Unity Catalog tagging page states the same rule for every securable: own the object, or hold APPLY TAG on it plus USE SCHEMA and USE CATALOG on its parents.

    This rule is narrower than it may look. On the same model-lifecycle page, editing a model's description has a stricter requirement: only the owner of the registered model, plus USE SCHEMA and USE CATALOG. APPLY TAG is not an option there. So a teammate who can tag your model may still be unable to edit its description. APPLY TAG is a privilege specifically for tagging.

    Privileges for changing model metadata in Unity Catalog
    OperationOn the registered modelOn the parent schemaOn the parent catalog
    Set or delete a tagOwner, or APPLY TAGUSE SCHEMAUSE CATALOG
    Update a descriptionOwnerUSE SCHEMAUSE CATALOG

    Checkpoint 2 of 8· Check yourself

    A data scientist is not the owner of prod.ml_team.iris_model but needs to add a validation_status tag to version 2. Which set of privileges is enough?

    Checkpoint 3 of 8· Exam question

    A data science team is evaluating model version 4 of a registered model against a new validation benchmark. Before deciding whether to update the `@challenger` alias, they want to record on that specific version that it `needs_review`, without changing anything about the other versions of the model or the registered model's own metadata. Which MLflow Client API call accomplishes this?

    Sources13

    3.Setting and deleting tags with MlflowClient

    The MLflow Client API has four tag methods for Unity Catalog models: a set and a delete at each of the two levels. Every call identifies the model by its full three-level name, catalog.schema.model, which in the documentation's example is prod.ml_team.iris_model. The sample below runs through all four in order.

    Setting and deleting tags on a registered model and on version 1 of it (Unity Catalog)python
    from mlflow import MlflowClient
    client = MlflowClient()
    
    # Set registered model tag
    client.set_registered_model_tag("prod.ml_team.iris_model", "task", "classification")
    
    # Delete registered model tag
    client.delete_registered_model_tag("prod.ml_team.iris_model", "task")
    
    # Set model version tag
    client.set_model_version_tag("prod.ml_team.iris_model", "1", "validation_status", "approved")
    
    # Delete model version tag
    client.delete_model_version_tag("prod.ml_team.iris_model", "1", "validation_status")

    Three patterns in the sample are what exam questions check:

    1. Removing a tag has its own method. You don't blank out the value. You call delete_registered_model_tag or delete_model_version_tag, and you pass only the key, because the key is all the call needs to find the tag. 2. Version methods take one extra argument. After the model name they take the version, written as "1" in the example. The registered-model methods have no version argument at all. 3. The method names follow a pattern. Each name is a verb (set_ or delete_), then the object (registered_model or model_version), then _tag. If you can name the object you are tagging, you can name the method.

    The four MlflowClient tag methods and the arguments the documentation passes
    MethodObjectArguments in the example
    set_registered_model_tagRegistered modelmodel name, key, value
    delete_registered_model_tagRegistered modelmodel name, key
    set_model_version_tagModel versionmodel name, version, key, value
    delete_model_version_tagModel versionmodel name, version, key

    Checkpoint 4 of 8· Match them up

    Match each MlflowClient method to what it does

    Tap a term, then the definition that fits it.

    Checkpoint 5 of 8· Fill the gap

    Version 1 has finished validation, and the validation_status tag must now be removed. Which method fills the blank?

    # Delete model version tag
    client. ? ("prod.ml_team.iris_model", "1", "validation_status")

    Checkpoint 6 of 8· Exam question

    An ML platform team wants every person browsing the Unity Catalog Model Registry to immediately see which team owns a registered model called `churn_model`, regardless of which version they are viewing. They plan to apply a single `team=growth` label to the model as a whole rather than repeating it on each version. Which call should they use?

    Sources1

    4.Tag constraints, and tagging outside Python

    The model-lifecycle page says tags at both levels must meet the platform-wide constraints. Unity Catalog's tagging page lists constraints for tags on securable objects, and these are the ones that most affect how you name model tags:

    - Tag keys are case sensitive, so Task and task are two different tags. A delete call has to use exactly the key that was set. - A tag key and a tag value can each be at most 256 characters long. - Tag keys cannot contain any of these characters: . , - = / :. That is why the documentation's examples use validation_status with an underscore. validation-status would break the rule. - Keys and values cannot have leading or trailing spaces.

    There is also a content rule. Tag data is stored as plain text and may be replicated globally, so don't put personal or sensitive information in tag names or values.

    For the UI, the model-lifecycle page doesn't describe the steps itself. It sends you to the general page on applying tags to Unity Catalog securable objects. Be careful with SQL. The UNSET TAG reference lists catalogs, schemas, tables, views, volumes, columns, functions and external metadata objects as the targets it works on, and registered models are not in that list. For models, the documented ways to remove a tag are the MLflow Client API shown above and the UI.

    Checkpoint 7 of 8· Check yourself

    Which of these is a valid key for a Unity Catalog model version tag?

    Sources124

    5.Tags that look similar but are not Unity Catalog model tags

    Exam questions often put tagging methods for other objects next to the correct one. Two kinds come up most.

    The legacy Workspace Model Registry. Models there can also carry tags at both levels, and the legacy page uses the same method names, set_registered_model_tag and set_model_version_tag, describing them as a way to "set or update" a tag. The legacy CLI reference states the overwrite rule directly: setting a key that already exists replaces its value. In the legacy registry, tags also make models searchable. The UI accepts tags.<key>=<value>, and search_registered_models() can filter on a tag. The point of this subdomain is the Unity Catalog version: three-level names, governed by APPLY TAG. Use the legacy behaviour only to recognize the old registry when a question describes it.

    Run, experiment and logged-model tags. The experiments CLI has set-tag for a run, set-experiment-tag for an experiment, and set-logged-model-tags for a logged model, identified by a model ID such as m-1234567890abcdef. These label tracking objects in an experiment. None of them puts a tag on a registered model in Unity Catalog or on one of its versions.

    Which object a tagging command actually labels
    Command or methodObject tagged
    client.set_registered_model_tag / delete_registered_model_tagRegistered model (Unity Catalog or legacy registry)
    client.set_model_version_tag / delete_model_version_tagModel version (Unity Catalog or legacy registry)
    databricks experiments set-tagAn MLflow run
    databricks experiments set-experiment-tagAn experiment
    databricks experiments set-logged-model-tagsA logged model, identified by MODEL_ID

    Checkpoint 8 of 8· Exam question

    A registered model named `pricing_model` carries a `status=deprecated` tag from an earlier retirement decision that has since been reversed. The team wants that tag gone entirely, not just cleared to an empty value, and the tag lives at the registered-model level, not on any single version. Which call removes it correctly?

    Sources567

    Exam traps

    Each one states something that sounds right. Open it to see what is actually true.

    1. 1.To remove a model tag, you set its value to an empty string with set_registered_model_tag or set_model_version_tag.Why is that wrong?

      Removing a tag has its own methods, delete_registered_model_tag and delete_model_version_tag, which take the key (and the version, for a version tag) and no value.

      Covered in Setting and deleting tags with MlflowClient

    2. 2.Only the owner of a registered model can add or delete tags on it.Why is that wrong?

      APPLY TAG on the model is an alternative to ownership, together with USE SCHEMA and USE CATALOG on the containers. Ownership is the only route for editing descriptions, not for tagging.

      Covered in Who is allowed to set or remove a tag

    3. 3.A tag on the registered model is the place to record the validation status of a single version.Why is that wrong?

      Model versions carry their own tags. Version-specific facts such as validation_status belong on the version, set with set_model_version_tag.

      Covered in What a model tag is, and the two places it can live

    4. 4.Running databricks experiments set-tag on the run that produced a model puts a tag on the registered model.Why is that wrong?

      set-tag labels an MLflow run, which is a tracking object. Registered models and model versions are tagged with their own methods.

      Covered in Tags that look similar but are not Unity Catalog model tags

    Practise it for real

    On a Unity Catalog model you own, set and then delete one tag at each level using MlflowClient.

    1. 1.Create a client with client = MlflowClient() and call client.set_registered_model_tag("<catalog>.<schema>.<model>", "task", "classification").

      Why: This adds a model-wide label that describes the model's purpose.

      You should see: The registered model's page shows the tag task:classification.

    2. 2.Call client.set_model_version_tag("<catalog>.<schema>.<model>", "1", "validation_status", "approved").

      Why: This adds a label to version 1 only, so other versions are left alone.

      You should see: Version 1 shows validation_status:approved and the other versions don't.

    3. 3.Call client.delete_model_version_tag("<catalog>.<schema>.<model>", "1", "validation_status") and then client.delete_registered_model_tag("<catalog>.<schema>.<model>", "task").

      Why: Removing a tag uses the delete methods and only needs the key, not a value.

      You should see: Both tags are gone, and the model and its versions are still there.

    Stuck? Get a nudge

    If a call fails with a permissions error, check that you own the model or have APPLY TAG on it, and that you have USE SCHEMA and USE CATALOG on its parents.

    Sources

    Every claim above is drawn from one of these pages, quoted as it was written on the date shown.

    1. 1.
      “Tags are key-value pairs that you associate with registered models and model versions”
      ↩︎ What a model tag is, and the two places it can live
      “Owner of or have APPLY TAG privilege on the registered model”
      ↩︎ Who is allowed to set or remove a tag
      “Permissions required: Owner of the registered model, plus USE SCHEMA and USE CATALOG privileges”
      ↩︎ Who is allowed to set or remove a tag
      “To set and delete tags using the MLflow Client API, see the examples below:”
      ↩︎ Setting and deleting tags with MlflowClient
      “Both registered model and model version tags must meet the platform-wide constraints.”
      ↩︎ Tag constraints, and tagging outside Python
      “See Apply tags to Unity Catalog securable objects to learn how to set and delete tags using the UI.”
      ↩︎ Tag constraints, and tagging outside Python
      “Tags are key-value pairs that you associate with registered models and model versions”
      ↩︎ Key concept
      “To set and delete tags using the MLflow Client API, see the examples below:”
      ↩︎ Exam trap 1
      “Owner of or have APPLY TAG privilege on the registered model”
      ↩︎ Exam trap 2
      “Tags are key-value pairs that you associate with registered models and model versions”
      ↩︎ Exam trap 3
      “you could tag versions undergoing pre-deployment validation with validation_status:pending and those cleared for deployment with validation_status:approved”
      ↩︎ Prediction
      “you could apply a tag with key "task" and value "question-answering" (displayed in the UI as task:question-answering) to registered models”
      ↩︎ Checkpoint
    2. 2.
      “Securable object tagging is currently supported on catalogs, schemas, tables, table columns, volumes, views, functions, registered models, model versions”
      ↩︎ What a model tag is, and the two places it can live
      “Tag keys are case sensitive. For example, Sales and sales are two distinct tags.”
      ↩︎ Tag constraints, and tagging outside Python
      “The maximum length of a tag key is 256 characters.”
      ↩︎ Tag constraints, and tagging outside Python
      “Trailing and leading spaces are not allowed in tag keys or values.”
      ↩︎ Tag constraints, and tagging outside Python
      “Tag data is stored as plain text and may be replicated globally.”
      ↩︎ Tag constraints, and tagging outside Python
      “The following characters are not allowed in tag keys: . , - = / :”
      ↩︎ Checkpoint
    3. 3.
      “To add tags to Unity Catalog securable objects, you must own the object or have all of the following privileges:”
      ↩︎ Who is allowed to set or remove a tag
    4. 4.
      “Removes a tag on a catalog, schema, table, view, volume, column, function, or external metadata object.”
      ↩︎ Tag constraints, and tagging outside Python
    5. 5.
      “To set or update a tag for a registered model or model version, use the MLflow Client API”
      ↩︎ Tags that look similar but are not Unity Catalog model tags
      “You can also search on tags. Enter tags in this format: tags.<key>=<value>.”
      ↩︎ Tags that look similar but are not Unity Catalog model tags
    6. 6.
      “If a tag with this name already exists, its preexisting value will be replaced by the specified value.”
      ↩︎ Tags that look similar but are not Unity Catalog model tags
    7. 7.
      “Sets a tag on a run. Tags are run metadata that can be updated during a run and after a run completes.”
      ↩︎ Tags that look similar but are not Unity Catalog model tags
      “Sets a tag on a run. Tags are run metadata that can be updated during a run and after a run completes.”
      ↩︎ Exam trap 4

    Ready to test yourself?

    Practise the 7 questions on this subdomain.

    Spotted a mistake, or was something unclear? Tell us.