[Draft] Add configurable dataset column logging to GRPOTrainer W&B tables #4045
+67
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds a wandb_log_extra_columns parameter to GRPOConfig that allows logging additional dataset columns to W&B tables during GRPO training. I found this helpful for including ground truth labels or other metadata alongside generated completions for easier evaluation.
Implementation
None
(default): No extra columns loggedExample Usage
This is quite a rough POC developed for a specific use case. Opening as a draft to discuss whether this functionality would be useful for TRL more broadly.
Example of logging an extra column for
grount_truth
I have done some minimal testing, but mostly made this for myself to start, so would probably benefit from some better tests if it seemed interesting to add to TRL.