Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to set a tag at the experiment level in MLFlow

I can see that an experiment in MLFlow can have tags (like runs can have tags). I'm able to set a run's tag using mlflow.set_tag, but how do I set it for an experiment?

like image 430
Nestor Avatar asked Oct 27 '25 18:10

Nestor


1 Answers

If you look into the Python API, the very first example in mlflow.tracking package that shows how to create the MLflowClient is really showing how to tag experiment using the client.set_experiment_tag function (doc):

from mlflow.tracking import MlflowClient

# Create an experiment with a name that is unique and case sensitive.
client = MlflowClient()
experiment_id = client.create_experiment("Social NLP Experiments")
client.set_experiment_tag(experiment_id, "nlp.framework", "Spark NLP")

you can also set it for model version with set_model_version_tag function, and for registered model with set_registered_model_tag.

like image 152
Alex Ott Avatar answered Oct 29 '25 09:10

Alex Ott



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!