How to load metrics in HF Trainer for the best model when `load_best_model_at_end=true`?

Hi everyone!

I’m experiencing some issues while using HF Trainer, since I want to run the evaluation at the end of each epoch, but also to load the best model at the end of the training, so I need to also save the model on each epoch, that as according to the Documentation means setting both save_strategy, and evaluation_strategy to “epoch”.

But then I want to log the metrics for the best run, so is there any way I can do so without running the evaluation again over the best model loaded at the end? As that has an issue which is that the metrics show that the epoch is not the same one as the one of the best run, but the latest epoch.

I hope I was clear enough… Thank you in advance! :smiley: