Arize AI
Search…
9. Tags
Tags are custom metadata filtering and granular cohorting beyond just features and values

Overview

With tags, users can group, monitor, slice, and investigate performance of “cohorts” based on user defined metadata for the model.
Tags are metadata that can be added to a model prediction or actual.

Code Example

1
# Declare which columns are the tag columns
2
schema = Schema(
3
prediction_id_column_name="prediction_id",
4
...
5
tag_column_names=["ZIP_CODE", "GENDER", "AGE", "DEVICE_OS", "INTERNAL_SERVER_NODE"],
6
)
7
8
# Log the dataframe with the schema mapping
9
response = arize_client.log(
10
model_id="sample-model-1",
11
model_version= "v1",
12
model_type=ModelTypes.NUMERIC,
13
environment=Environments.PRODUCTION,
14
dataframe=test_dataframe,
15
schema=schema,
16
)
Copied!

FAQ

  • What types of events can I send in tags on?
Tags can be sent in on predictions or actuals. If tags are sent in on both a prediction and its corresponding actual, Arize merges the tag maps, keeping the prediction tag’s value if the tag keys sent are identical.
For example, if a user sends Arize a Prediction with tags "location": "New York" and "month": "January" and an Actual with tags "location": "Chicago" and "fruit": "apple", the resulting tags available will be "location": "New York" , "month": "January" , and "fruit": "apple".
  • What are some good uses for tags?
Tags are a convenient workaround to group any features by metadata you find important (what server/node was this prediction or actual served on, sensitive categories, model or feature operational metrics), but don't want to send as an input to the model.
  • How do I monitor based on tags?
You can create a filter for features based on a tag and create monitors for those features. Tags and monitors will be more tightly integrated in Arize soon!
Questions? Email us at [email protected] or Slack us in the #arize-support channel
Copy link