Add tags to runs
Add tags to label runs with particular features that might not be obvious from the logged metrics or artifact data. For example, you can add a tag to a run to indicated that that run's model is in_production
, that run is preemptible
, this run represents the baseline
, and so forth.
How to add tagsโ
You can add tags to a run when it is created: wandb.init(tags=["tag1", "tag2"])
.
You can also update the tags of a run during training (for example, if a particular metrics crosses a pre-defined threshold):
run = wandb.init(entity="entity", project="capsules", tags=["debug"])
# python logic to train model
if current_loss < threshold:
run.tags = run.tags + ("release_candidate",)
There are also several ways to add tags after runs have been logged to W&B.
- Using the Public API
- Project Page
- Run Page
After you create a run, you can update tags using the Public API. For example:
run = wandb.Api().run("{entity}/{project}/{run-id}")
run.tags.append("tag1") # you can choose tags based on run data here
run.update()
Read more about how to use the Public API in the reference documentation or guide.
This method is best suited to tagging large numbers of runs with the same tag or tags.
- In the runs sidebar of the Project Page, select the table icon in the upper-right. This expands the sidebar into the full runs table.
- Hover your mouse over a run in the table to see a checkbox on the left or look in the header row for a checkbox that select all runs.
- Select the checkbox to enable bulk actions.
- Select the runs to which you want to apply your tags.
- Select the Tag button above the rows of runs.
- Type the tag you want to add and select the Create new tag checkbox to add the tag.
This method is best suited to applying a tag or tags to a single run manually.
- In the left sidebar of the Run Page, select the top Overview tab.
- Select the gray plus icon (+) button next to Tags.
- Type a tag you want to add and select Add below the text box to add a new tag.
How to remove tagsโ
Tags can also be removed from runs with the W&B App UI.
- Project Page
- Run Page
This method is best suited to removing tags from a large numbers of runs.
- In the runs sidebar of the Project Page, select the table icon in the upper-right. This will expand the sidebar into the full runs table.
- Hover over a run in the table to see a checkbox on the left or look in the header row for a checkbox to select all runs.
- Select the checkbox to enable bulk actions.
- Select the runs you want to remove tags.
- Select the Tag button above the rows of runs.
- Select the checkbox next to a tag to remove it from the run.
- In the left sidebar of the Run Page, select the top Overview tab. The tags on the run are visible here.
- Hover over a tag and select the "x" to remove it from the run.