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.
| Level | Example key | Example values | What it labels |
|---|---|---|---|
| Registered model | task | question-answering, classification | The function of the model as a whole |
| Model version | validation_status | pending, approved | The 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?
A model's purpose applies to the whole registered model, which is where the documentation puts its task example. Version-level tags are for facts about one version, such as its validation status.
“you could apply a tag with key "task" and value "question-answering" (displayed in the UI as task:question-answering) to registered models”Source: docs.databricks.com
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.
| Operation | On the registered model | On the parent schema | On the parent catalog |
|---|---|---|---|
| Set or delete a tag | Owner, or APPLY TAG | USE SCHEMA | USE CATALOG |
| Update a description | Owner | USE SCHEMA | USE 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?
APPLY TAG stands in for ownership, but you still need USE SCHEMA and USE CATALOG on the containers to reach the model.
“Owner of or have APPLY TAG privilege on the registered model”Source: docs.databricks.com
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?
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_tag` with 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.
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.
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.
| Method | Object | Arguments in the example |
|---|---|---|
| set_registered_model_tag | Registered model | model name, key, value |
| delete_registered_model_tag | Registered model | model name, key |
| set_model_version_tag | Model version | model name, version, key, value |
| delete_model_version_tag | Model version | model 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.
Each method name is a verb (set or delete), then the object (registered model or model version), then _tag. The version methods also take a version argument.
“To set and delete tags using the MLflow Client API, see the examples below:”Source: docs.databricks.com
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")The call passes a version and only a key, so it removes a version-level tag. delete_registered_model_tag takes no version, set_model_version_tag also needs a value, and delete_model_version would delete the version itself rather than the tag.
Source: docs.databricks.comCheckpoint 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?
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_model` would 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_model` after it already exists.
- D. Setting the tag through `set_registered_model_tag` attaches the key-value pair to the registered model itself, so the ownership label is visible for every version without needing to repeat it.
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?
Hyphens, periods and colons are not allowed in tag keys, and underscores are. That is why the documentation's example key is validation_status.
“The following characters are not allowed in tag keys: . , - = / :”Source: docs.databricks.com
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.
| Command or method | Object tagged |
|---|---|
| client.set_registered_model_tag / delete_registered_model_tag | Registered model (Unity Catalog or legacy registry) |
| client.set_model_version_tag / delete_model_version_tag | Model version (Unity Catalog or legacy registry) |
| databricks experiments set-tag | An MLflow run |
| databricks experiments set-experiment-tag | An experiment |
| databricks experiments set-logged-model-tags | A logged model, identified by MODEL_ID |
No. Setting a key that already exists replaces its value, so the model ends up with one tag, task:regression. The legacy CLI reference says so directly, and the legacy page describes the client method as setting or updating a tag.
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?
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_tag` removes the key entirely from the registered model's tag set, which matches the requirement to drop the `status` key rather than merely blank out its value.
- B. Setting the value to an empty string still leaves the `status` key 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 `status` tag 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.
Exam traps
Each one states something that sounds right. Open it to see what is actually true.
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.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.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.Running
databricks experiments set-tagon 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.Create a client with
client = MlflowClient()and callclient.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.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.Call
client.delete_model_version_tag("<catalog>.<schema>.<model>", "1", "validation_status")and thenclient.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.
“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.
“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.https://docs.databricks.com/aws/en/data-governance/unity-catalog/certify-deprecate-dataOfficial docs
“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.
“Removes a tag on a catalog, schema, table, view, volume, column, function, or external metadata object.”
↩︎ Tag constraints, and tagging outside Python - 5.https://docs.databricks.com/aws/en/machine-learning/manage-model-lifecycle/workspace-model-registryOfficial docs
“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.
“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.
“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