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.
| Tag lives on | Typical use | Set with |
|---|---|---|
| Registered model | Task or owning team for the whole model | client.set_registered_model_tag |
| Model version | Validation status of one version | client.set_model_version_tag |
| MLflow run | Metadata about one training run | databricks experiments set-tag |
| MLflow experiment | Metadata about the experiment | databricks 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?
Review status describes one artifact, so it belongs on the model version. That is the only way version 3 can be approved while version 4 is still pending. A registered-model tag describes the whole model, and run or experiment tags never appear on the registered model or its versions.
“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.”Source: docs.databricks.com
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.
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_versionorupdate_registered_model, is free text such as an overview of the problem or the method. It isn't a key-value pair, so writingneeds_review=trueinto it doesn't create a tag. - An alias is a mutable name such as
@championthat points at exactly one version and is used to promote models. That is covered in champion and challenger aliases. Creating an alias calledneeds_reviewadds 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")set_model_version_tag takes the version number as an extra argument and labels only that version. set_registered_model_tag labels the whole model and has no version argument. update_model_version sets a free-text description, not a key-value tag.
Source: docs.databricks.comCheckpoint 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?
Correct answer: B — client.set_model_version_tag(name="fraud_model", version=4, key="needs_review", value="true") to attach the label directly to version 4 only.
- A. This assigns the tag at the registered-model level instead of the version level, so it would apply to the model as a whole rather than flagging only version 4 for review.
- B. Calling
set_model_version_tagwith the version number scopes the key-value pair to model version 4 only, leaving other versions and the registered model's own tags untouched — exactly what a per-version review flag needs. - C. The description field stores free-text notes, not structured key-value tags, so this value would not be queryable through tag-based search and does not use the tagging API at all.
- D. Aliases are mutable named references used to route traffic or lookups to a specific version, like
@champion, not a mechanism for recording arbitrary metadata such as a review flag.
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?
Correct answer: D — client.set_registered_model_tag(name="churn_model", key="team", value="growth") to attach the label once at the registered-model level.
- A. Scoping the call to a single version number only labels that one version, so anyone browsing a later version of
churn_modelwould not see the ownership tag at all. - B. Aliases are meant to point to a specific version for routing purposes, like
@champion, and reusing one as a label misuses the mechanism instead of recording searchable metadata. - C. This recreates the registered model rather than tagging an existing one, and passing tags at creation time only works for a brand-new model, not for adding a label to
churn_modelafter it already exists. - D. Setting the tag through
set_registered_model_tagattaches the key-value pair to the registered model itself, so the ownership label is visible for every version without needing to repeat it.
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.
| Intent | Call | Result |
|---|---|---|
| Change a tag's value | set_registered_model_tag or set_model_version_tag with an existing key | Key kept, value replaced |
| Remove a model-level tag | delete_registered_model_tag(name, key) | Key gone from the registered model |
| Remove a version-level tag | delete_model_version_tag(name, version, key) | Key gone from that version only |
| Set the value to an empty string | set_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?
delete_model_version_tag takes the version number and the key, and it removes the tag from that one version. Setting the value to an empty string keeps the key, so the tag is still there. delete_registered_model_tag works at the model level and doesn't reach a tag on a version.
“client.delete_model_version_tag("prod.ml_team.iris_model", "1", "validation_status")”Source: docs.databricks.com
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?
The SQL tag commands work on other securable objects but not on registered models. Those have to be tagged through Catalog Explorer or the MLflow Client API. Setting an empty value would keep the key anyway.
“For registered models, you must use Catalog Explorer or the MLflow ClientAPI.”Source: docs.databricks.com
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?
Correct answer: A — client.delete_registered_model_tag(name="pricing_model", key="status") to remove the key from the registered model.
- A.
delete_registered_model_tagremoves the key entirely from the registered model's tag set, which matches the requirement to drop thestatuskey rather than merely blank out its value. - B. Setting the value to an empty string still leaves the
statuskey present with an empty value, so it would still show up in tag listings and tag-based searches instead of disappearing. - C. This targets a tag on a specific model version rather than the registered model, so it would not touch the model-level
statustag the team wants removed. - D. Unity Catalog's Model Registry does not use the legacy workspace-registry stage concept, and even if a stage transition existed here, changing a version's stage would not delete a tag on the registered model.
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 setApproval_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?
A non-owner needs APPLY TAG to change the model's tags, plus USE SCHEMA and USE CATALOG to reach the model. Ownership isn't required, and the USE privileges don't allow tag changes without APPLY TAG.
“APPLY TAG privilege on the registered model, plus USE SCHEMA and USE CATALOG privileges on the schema and catalog containing the model”Source: docs.databricks.com
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
Teamandteamare 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.
The key has a hyphen, which isn't allowed in tag keys, and a trailing space, which isn't allowed in keys or values. Even with both fixed, "Validation_Status" would be a different tag from "validation_status", because keys are case sensitive.
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".
Hyphens, colons and periods aren't allowed in tag keys, so needs-review, task:qa and review.status are rejected. The disallowed-character rule covers keys only, so the value question-answering can keep its hyphen.
“The following characters are not allowed in tag keys: . , - = / :”Source: docs.databricks.com
Sources
(5)
Every claim above is drawn from one of these pages, quoted as it was written on the date shown.
- 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.
“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.
“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.
“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.
“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