Search code examples
mlflowmlops

Log text in mlflow


I know that you can log metrics as your experiment progresses. For example the training loss over epochs for your DL model.

I was wondering if it was possible to do something similar for text. In my particular case I have a text model that generates some example text after each epoch and I wish to see what it's like. For example:

Epoch 1:
tHi is RubisH
Epoch 2:
Ok look slight better
Epoch 3:
I can speak English better than William Shakespeare

The workaround I can think of is to log this to a text file and push that as an artifact in mlflow. Was wondering if there was something else more native to mlflow.


Solution

  • You can use log_param/log_params for that. For long texts maybe it's better to use log_text instead...