5

I am confused about the usecase of mlflow.set_tag() vs mlflow.log_params() as both takes key and value pair. Currently, I use mlflow.set_tag() to set tags for data version, code version, etc and mlflow.log_params() to set model training parameters like loss, accuracy, optimizer, etc.

Manas
  • 888
  • 10
  • 20
  • 1
    If you are still looking for an answers: - Tags can cover dataset s3 path(train/valid), version, # of features, dataset size, shape... - Params can cover model's backend,booster used, max/min depth – teedak8s Jun 22 '22 at 21:41

1 Answers1

3

As teedak8s pointed out in the comments, tags and params are supposed to log different things. Params are something you want to tune based on the metrics, whereas tags are some extra information that doesn't necessarily associate with the model's performance. See how they use tags and params differently for sklearn, torch, and other packages in the Automatic Logging. That being said, as I understand it, there's no hard constraint on which to use to log which; they can be used interchangeably without error.

hokkaido
  • 41
  • 3