Skip to content

Conversation

@cam1llynha
Copy link

This PR adds guidance in the DPO script on how to log and save evaluation metrics during regular evaluations, not only at the end of training.
The implementation includes an example of a custom callback (TrainerCallback) that allows logging intermediate metrics and clarifies how W&B (Weights & Biases) aggregates metrics across the evaluation dataset.
The goal is to provide clear reference for users who want to monitor metrics throughout the process without changing the core logic.

Related Issue:
Closes #2602

This PR adds a helpful comment in the DPO script explaining how to log and save evaluation metrics during regular evaluations using a custom callback. It also clarifies W&B behavior regarding metric aggregation.

Related to issue huggingface#2602.

Checklist:
- [x] Added clear example for custom callback
- [x] Clarified W&B aggregation behavior
- [x] No code logic changed, only documentation tip
@cam1llynha
Copy link
Author

Hi team! This PR addresses the question raised in issue #2602 by adding a clear tip on how to log evaluation metrics during regular evaluations using a custom callback.
Please let me know if any adjustments are needed. Thanks for reviewing!

@qgallouedec
Copy link
Member

thanks @cam1llynha. In my opinion, this belongs to the transformers documentation as it's common to all trainers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Question] Log eval metrics performed during training to files

2 participants