Tags are labels for a run. A tag is represented by a string tag name and value.

Adding tags programmatically

from truefoundry.ml import get_client

client = get_client()
client.create_ml_repo("iris-demo")
run = client.create_run(ml_repo="iris-demo", run_name="svm-model")

run.set_tags({"env": "development", "task": "classification"})
run.end()

How can I programmatically fetch the tags for a run?

You can use the get_tags method. It returns a dictionary.

from truefoundry.ml import get_client

client = get_client()
run = client.get_run("run-id-of-the-run")

print(run.get_tags())

Adding tags with UI

You can view the tags from the dashboard and also create new tags.

2890

Adding tags