import mlflow with mlflow.start_run() as run: tag = mlflow.entities.RunTag(key="dataset", value="MNIST") mlflow.set_tag(tag.key, tag.value)
import mlflow run_id = "1234" tag = mlflow.entities.RunTag(key="experiment", value="My Experiment") mlflow.tracking.MlflowClient().set_tag(run_id, tag.key, tag.value)This example shows how to set a `RunTag` for a run that has already been created. We first create a `RunTag` object with the key "experiment" and the value "My Experiment". We then use the MLflow client to set this tag for the run with ID "1234". Both examples use the `mlflow.entities` package to work with `RunTag` objects.