it’s up to you, although i’d do it on_evaluate so that you can easily control the logging frequency with eval_steps. you could try subclassing TrainerCallback and copy-pasting / adapting the code from the notebook callback here: transformers/notebook.py at d9c62047a8d75e18d2849d345ab3394875a712ef · huggingface/transformers · GitHub 32