CertSafari
    Databricks Certified Machine Learning Associate· Lessons

    Domain 1 · Lesson 17/48

    Set and remove tags on Unity Catalog models and model versions

    Set or remove a tag for a model

    16 min read
    2.11% of exam
    5 sources
    Published 22 Oct 2026
    Docs as of 17 Oct 2026

    What you will be able to do

    • Choose between a registered-model tag and a model-version tag for a given labelling need
    • Set and delete tags with the MLflow Client API calls set_registered_model_tag, set_model_version_tag, delete_registered_model_tag and delete_model_version_tag
    • Tell tags apart from descriptions, aliases, legacy stages, and run or experiment tags
    • State who may set or remove a model tag and which key and value formats are rejected

    Key concept

    Model and model-version tags — A tag is a key-value label attached to a Unity Catalog object. You can put it on the registered model as a whole or on one numbered version. Where you attach it decides what it describes, and each level has its own MLflow Client calls to set and delete it.

    1.What a tag on a model records

    A registered model in Unity Catalog holds more than its versions. It also carries labels that people and automation can read: which task it serves, which team owns it, whether a version has passed review. Those labels are tags. Each tag is a key with a value, and the UI shows it as key:value. For example, a model meant for question answering could carry the key task with the value question-answering.

    Tags exist at two levels, and each level answers a different question. A tag on the registered model describes everything the model is, such as its task or owning team. A tag on a model version describes one artifact. The usual example is review status: versions still in pre-deployment validation get validation_status:pending, and versions cleared for deployment get validation_status:approved. Version 3 can be approved while version 4 is still pending, and that's only possible because the status sits on each version.

    Tags on a model can also gate automation. In an MLflow 3 deployment job, an approval task can wait until a reviewer adds a required tag to the model version. When the run is repaired, the approval task passes because the tag is now present, and the job moves on to deployment.

    Model tags are separate from the tags MLflow tracking keeps. A run tag is metadata on one training run, set through the experiments API, and it can be updated during or after the run. An experiment tag labels the experiment that groups those runs. Neither one appears on the registered model or its versions, and the registry tag calls never touch a run.

    Four kinds of tag an ML workflow can carry
    Tag lives onTypical useSet with
    Registered modelTask or owning team for the whole modelclient.set_registered_model_tag
    Model versionValidation status of one versionclient.set_model_version_tag
    MLflow runMetadata about one training rundatabricks experiments set-tag
    MLflow experimentMetadata about the experimentdatabricks experiments set-experiment-tag

    Checkpoint 1 of 9· Check yourself

    A team keeps one registered model in Unity Catalog. Version 3 has passed pre-deployment review, but version 4 is still being validated. Where should they record each version's review status?

    Sources123

    2.Setting a tag at the right level

    You manage both levels with MlflowClient, and the level is in the method name. set_registered_model_tag(name, key, value) labels the model as a whole. set_model_version_tag(name, version, key, value) has one extra argument, the version number, and labels only that version. The model name is the three-level Unity Catalog name, catalog.schema.model. The full set of calls, including the two delete calls covered in the next section, looks like this.

    Setting and deleting tags on a Unity Catalog registered model and on one of its versionspython
    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")

    The level matters in both directions. Suppose a team wants everyone browsing the registry to see that churn_model belongs to the growth team, whichever version they open. That's one set_registered_model_tag call on the existing model. Tagging version 1 would label only version 1. Repeating the tag on every version would also be wrong, because tags aren't inherited: a model-level tag doesn't become a tag on each version. Inheritance only happens when attribute-based access control (ABAC) policies are evaluated, and those apply tags down the catalog hierarchy.

    Three nearby features look like tags but do other jobs:

    • A description, set with update_model_version or update_registered_model, is free text such as an overview of the problem or the method. It isn't a key-value pair, so writing needs_review=true into it doesn't create a tag.
    • An alias is a mutable name such as @champion that points at exactly one version and is used to promote models. That is covered in champion and challenger aliases. Creating an alias called needs_review adds a pointer, not a label.
    • Stages such as Staging and Production belong to the legacy Workspace Model Registry. Unity Catalog uses aliases in their place, so a stage transition doesn't add or remove a Unity Catalog tag.

    Checkpoint 2 of 9· Fill the gap

    This line should label only version 1 of prod.ml_team.iris_model as approved. The registered model's own tags and its other versions must not change. Which method name completes it?

    client. ? ("prod.ml_team.iris_model", "1", "validation_status", "approved")

    Checkpoint 3 of 9· 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?

    Checkpoint 4 of 9· 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?

    Sources14

    3.Removing a tag instead of blanking it

    Calling a set method with a key the object already has updates that tag in place. The new value replaces the old one, and the key stays. So setting status to an empty string leaves a tag called status with an empty value, and anyone filtering on that key still finds it. To remove the key entirely, you need a delete call.

    Each delete call matches its set call. Both take the key but no value, since you are naming the tag to remove rather than writing to it:

    • delete_registered_model_tag(name, key) removes a tag from the registered model.
    • delete_model_version_tag(name, version, key) removes a tag from one version.
    • Neither call reaches the other level. A tag set on the registered model isn't removed by deleting a tag of the same name from version 1.
    Which call matches which intent
    IntentCallResult
    Change a tag's valueset_registered_model_tag or set_model_version_tag with an existing keyKey kept, value replaced
    Remove a model-level tagdelete_registered_model_tag(name, key)Key gone from the registered model
    Remove a version-level tagdelete_model_version_tag(name, version, key)Key gone from that version only
    Set the value to an empty stringset_registered_model_tag with value ""Key still present, so the tag isn't removed

    For registered models, the MLflow Client API isn't the only way to edit tags. Catalog Explorer can add, edit and remove them from the model's Overview page. The SQL tag commands (SET TAG, UNSET TAG, ALTER ... SET TAGS) work on other securable objects, but registered models must be tagged through Catalog Explorer or the MLflow Client API.

    Checkpoint 5 of 9· Check yourself

    Version 1 of prod.ml_team.iris_model carries validation_status:approved, and that key must disappear from version 1. Anyone filtering on the key should stop finding it there. Which call does that?

    Checkpoint 6 of 9· Check yourself

    From a SQL notebook, an engineer wants to remove the task tag from the registered model prod.ml_team.iris_model. Which approach works?

    Checkpoint 7 of 9· 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?

    Sources514

    4.Who may set or remove a model tag

    Setting or deleting a tag needs less than owning the model. You can do it if you own the registered model. You can also do it if you hold APPLY TAG on the model, plus USE SCHEMA on its schema and USE CATALOG on its catalog. The two USE privileges only let you reach the model. APPLY TAG is what lets you change its tags. How these privileges fit into the wider model grant model is covered in Unity Catalog privileges on registered models.

    This split lets you separate review from ownership. A reviewer can hold APPLY TAG without owning the model. In a deployment job, the person who approves needs APPLY TAG on the model and CAN MANAGE RUN on the job. Editing a model's description is different: it requires ownership of the registered model, and APPLY TAG isn't enough.

    Governed tags tighten control over specific keys. To apply a governed tag you also need the ASSIGN permission on that tag. A governed tag policy can therefore limit who sets a particular key:

    • Only the Legal team can set Approval_Legal, and only the Security team can set Approval_Security, even though both teams hold APPLY TAG on the model.
    • A policy can stop the model owner from setting the approval tag, so a second person has to approve.
    • Consistent tag names and policies can be enforced across a metastore, catalog or schema.

    Checkpoint 8 of 9· Check yourself

    A reviewer who doesn't own prod.ml_team.iris_model has to set and remove validation_status tags on its versions. Which set of grants is enough for them to do that?

    Sources142

    5.Key and value rules that reject a tag

    Model and model-version tags follow the same constraints as every other Unity Catalog tag, and a key that breaks them is rejected:

    • Keys are case sensitive, so Team and team are two different tags.
    • Keys and values can each be at most 256 characters.
    • Keys can't contain . , - = / or :.
    • Keys and values can't have leading or trailing spaces.
    • One object can have at most 50 tags.

    The character rule catches common habits. validation_status and needs_review are valid because they use underscores. needs-review contains a hyphen and is rejected. The colon in task:question-answering is only how the UI displays a tag, so the key is task. You can't put a colon inside a key yourself. The value, question-answering, may keep its hyphen, because the disallowed-character rule applies only to keys.

    Treat tag contents as public. Tag data is stored as plain text and may be replicated globally, so personal or sensitive information shouldn't appear in a key or a value. A tag like owner_email filled with a customer's address breaks that rule even if every format check passes. Put an owning team's name in the tag and keep personal details out.

    Checkpoint 9 of 9· Check yourself

    Which of these tag calls on prod.ml_team.iris_model would Unity Catalog accept? Here, name is "prod.ml_team.iris_model".

    Sources14

    Sources

    (5)

    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, allowing you to label and categorize them by function or status.”
      ↩︎ What a tag on a model records
      “(displayed in the UI as task:question-answering)”
      ↩︎ What a tag on a model records
      “To set and delete tags using the MLflow Client API, see the examples below:”
      ↩︎ Setting a tag at the right level
      “You can include a text description for any model or model version in Unity Catalog.”
      ↩︎ Setting a tag at the right level
      “client.delete_registered_model_tag("prod.ml_team.iris_model", "task")”
      ↩︎ Removing a tag instead of blanking it
      “Owner of or have APPLY TAG privilege on the registered model, plus USE SCHEMA and USE CATALOG privileges”
      ↩︎ Who may set or remove a model tag
      “Permissions required: Owner of the registered model, plus USE SCHEMA and USE CATALOG privileges on the schema and catalog containing the model.”
      ↩︎ Who may set or remove a model tag
      “Both registered model and model version tags must meet the platform-wide constraints.”
      ↩︎ Key and value rules that reject a tag
      “Tags are key-value pairs that you associate with registered models and model versions, allowing you to label and categorize them by function or status.”
      ↩︎ Key concept
      “Owner of or have APPLY TAG privilege on the registered model, plus USE SCHEMA and USE CATALOG privileges”
      ↩︎ Exam trap 4
      “At the model version level, you could tag versions undergoing pre-deployment validation with validation_status:pending and those cleared for deployment with validation_status:approved.”
      ↩︎ Checkpoint
      “At the model version level, you could tag versions undergoing pre-deployment validation with validation_status:pending and those cleared for deployment with validation_status:approved.”
      ↩︎ Prediction
      “client.delete_model_version_tag("prod.ml_team.iris_model", "1", "validation_status")”
      ↩︎ Checkpoint
      “APPLY TAG privilege on the registered model, plus USE SCHEMA and USE CATALOG privileges on the schema and catalog containing the model”
      ↩︎ Checkpoint
    2. 2.
      “it passes because the required Unity Catalog tag is now present.”
      ↩︎ What a tag on a model records
      “Set a tag policy to prevent the model owner from approving the job to verify that there is a second person approval.”
      ↩︎ Who may set or remove a model tag
    3. 3.
      “Sets a tag on a run. Tags are run metadata that can be updated during a run and after a run completes.”
      ↩︎ What a tag on a model records
      “Sets a tag on an experiment. Experiment tags are metadata that can be updated.”
      ↩︎ What a tag on a model records
    4. 4.
      “Implicit tag inheritance occurs when evaluating ABAC policies only. Tag inheritance doesn't apply generally.”
      ↩︎ Setting a tag at the right level
      “For registered models, you must use Catalog Explorer or the MLflow ClientAPI.”
      ↩︎ Removing a tag instead of blanking it
      “To add a governed tag to Unity Catalog securable objects, you must also have the ASSIGN permission on the governed tag.”
      ↩︎ Who may set or remove a model tag
      “Tag keys are case sensitive. For example, Sales and sales are two distinct tags.”
      ↩︎ Key and value rules that reject a tag
      “The following characters are not allowed in tag keys: . , - = / :”
      ↩︎ Key and value rules that reject a tag
      “Trailing and leading spaces are not allowed in tag keys or values.”
      ↩︎ Key and value rules that reject a tag
      “Tag data is stored as plain text and may be replicated globally.”
      ↩︎ Key and value rules that reject a tag
      “Implicit tag inheritance occurs when evaluating ABAC policies only. Tag inheritance doesn't apply generally.”
      ↩︎ Exam trap 1
      “For registered models, you must use Catalog Explorer or the MLflow ClientAPI.”
      ↩︎ Exam trap 3
      “The following characters are not allowed in tag keys: . , - = / :”
      ↩︎ Exam trap 5
    5. 5.
      “If a tag with this name already exists, its preexisting value will be replaced by the specified value.”
      ↩︎ Removing a tag instead of blanking it
      “If a tag with this name already exists, its preexisting value will be replaced by the specified value.”
      ↩︎ Exam trap 2

    Ready to test yourself?

    Practise the 7 questions on this subdomain.

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