How can I append some text to the output of learn.fit_one_cycle?

I built a simple callback that outputs the ROC/AUC score at the end of training via print(...), but it now overwrites the output generated by learn.fit_one_cycle().

Is there a way I can just append this output to that displayed as a result of calling fit()?

1 Like

Iā€™m not sure why, but appears that my call to self.learn.get_preds() is the culprit:

def on_epoch_end(self, **kwargs:Any)->None:
        preds, targets = self.learn.get_preds()
        print('test')

If I remove the call to get_preds, the printed text is appended to the output rather than replacing everything.

Any ideas how to fix?