Wallaroo Model Tag Management
Table of Contents
Tags can be used to label, search, and track models across different versions. The following guide will demonstrate how to:
- Create a tag for a specific model version.
- Remove a tag for a specific model version.
The example shown uses the model ccfraudmodel
.
Tag Models via the Wallaroo Dashboard
Add a New Tag to a Model Version
To set a tag for a specific version of a model uploaded to Wallaroo using the Wallaroo Dashboard:
- Log into your Wallaroo instance.
- Select the workspace the models were uploaded into.
- Select View Models.
- From the Model Select Dashboard page, select the model to update.
- From the Model Dashboard page, select the version of the model. By default, the latest version will be selected.
- Select the + icon under the name of the model and it’s hash value.
- Enter the name of the new tag. When complete, select Enter. The tag will be set to this version of the model selected.
Remove a Tag from a Model Version
To remove a tag from a version of an uploaded model:
IMPORTANT NOTE
Once a tag is deleted from a model version, it can not be undeleted.- Log into your Wallaroo instance.
- Select the workspace the models were uploaded into.
- Select View Models.
- From the Model Select Dashboard page, select the model to update.
- From the Model Dashboard page, select the version of the model. By default, the latest version will be selected.
- Select the X for the tag to delete. The tag will be removed from the model version.
Tag Models via the Wallaroo SDK
Tags are applied to either model versions or pipelines. This allows organizations to track different versions of models, and search for what pipelines have been used for specific purposes such as testing versus production use.
Create Tag
Tags are created with the Wallaroo client command create_tag(String tagname)
. This creates the tag and makes it available for use.
The tag will be saved to the variable currentTag
to be used in the rest of these examples.
# Now we create our tag
currentTag = wl.create_tag("My Great Tag")
List Tags
Tags are listed with the Wallaroo client command list_tags()
, which shows all tags and what models and pipelines they have been assigned to.
# List all tags
wl.list_tags()
id | tag | models | pipelines |
---|---|---|---|
1 | My Great Tag | [('tagtestmodel', ['70169e97-fb7e-4922-82ba-4f5d37e75253'])] | [] |
Wallaroo Model Tag Management
Tags are used with models to track differences in model versions.
Assign Tag to a Model
Tags are assigned to a model through the Wallaroo Tag add_to_model(model_id)
command, where model_id
is the model’s numerical ID number. The tag is applied to the most current version of the model.
For this example, the currentTag
will be applied to the tagtest_model
. All tags will then be listed to show it has been assigned to this model.
# add tag to model
currentTag.add_to_model(tagtest_model.id())
{'model_id': 1, 'tag_id': 1}
Search Models by Tag
Model versions can be searched via tags using the Wallaroo Client method search_models(search_term)
, where search_term
is a string value. All models versions containing the tag will be displayed. In this example, we will be using the text from our tag to list all models that have the text from currentTag
in them.
# Search models by tag
wl.search_models('My Great Tag')
name | version | file_name | image_path | last_update_time |
---|---|---|---|---|
tagtestmodel | 70169e97-fb7e-4922-82ba-4f5d37e75253 | ccfraud.onnx | None | 2022-11-29 17:15:21.703465+00:00 |
Remove Tag from Model
Tags are removed from models using the Wallaroo Tag remove_from_model(model_id)
command.
In this example, the currentTag
will be removed from tagtest_model
. A list of all tags will be shown with the list_tags
command, followed by searching the models for the tag to verify it has been removed.
### remove tag from model
currentTag.remove_from_model(tagtest_model.id())
{'model_id': 1, 'tag_id': 1}