Set tags for an MLFlow Experiment using Python?

NAS
New Contributor III

There is this rest API: https://www.mlflow.org/docs/latest/rest-api.html#set-experiment-tag

Can I do the same from python's MLFlow API?

NAS
New Contributor III

Someone answered first in StackOverflow. Here it is:

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")