Tags can be used to label, search, and track pipelines across a Wallaroo instance. The following guide will demonstrate how to:
The example shown uses the pipeline ccfraudpipeline
.
To set a tag to pipeline using the Wallaroo Dashboard:
To remove a tag from a pipeline:
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.
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")
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'])] | [] |
Tags are used with pipelines to track different pipelines that are built or deployed with different features or functions.
Tags are added to a pipeline through the Wallaroo Tag add_to_pipeline(pipeline_id)
method, where pipeline_id
is the pipeline’s integer id.
For this example, we will add currentTag
to testtest_pipeline
, then verify it has been added through the list_tags
command and list_pipelines
command.
# add this tag to the pipeline
currentTag.add_to_pipeline(tagtest_pipeline.id())
{'pipeline_pk_id': 1, 'tag_pk_id': 1}
Pipelines can be searched through the Wallaroo Client search_pipelines(search_term)
method, where search_term
is a string value for tags assigned to the pipelines.
In this example, the text “My Great Tag” that corresponds to currentTag
will be searched for and displayed.
wl.search_pipelines('My Great Tag')
name | version | creation_time | last_updated_time | deployed | tags | steps |
---|---|---|---|---|---|---|
tagtestpipeline | 5a4ff3c7-1a2d-4b0a-ad9f-78941e6f5677 | 2022-29-Nov 17:15:21 | 2022-29-Nov 17:15:21 | (unknown) | My Great Tag |
Tags are removed from a pipeline with the Wallaroo Tag remove_from_pipeline(pipeline_id)
command, where pipeline_id
is the integer value of the pipeline’s id.
For this example, currentTag
will be removed from tagtest_pipeline
. This will be verified through the list_tags
and search_pipelines
command.
## remove from pipeline
currentTag.remove_from_pipeline(tagtest_pipeline.id())
{'pipeline_pk_id': 1, 'tag_pk_id': 1}