Remove silently-ignored W&B/Hub fields from GOLD and Distillation configs#6023
Open
DaoyuanLi2816 wants to merge 1 commit into
Open
Conversation
…figs GOLDConfig carries six fields (`wandb_entity`, `wandb_project`, `wandb_run_group`, `hub_model_revision`, `overwrite_hub_revision`, `push_to_hub_revision`) and DistillationConfig three (`wandb_entity`, `wandb_project`, `wandb_run_group`) that nothing in TRL reads — no trainer reference, no env-var wiring, no Hub-revision push logic, no test. They were carried over from open-r1-style configs, where `init_wandb_training()` and a push-to-hub-revision callback consume them; those consumers were never ported. Setting any of them today silently does nothing — e.g. `GOLDConfig(wandb_project="my-project")` neither configures W&B nor warns. Removing the fields makes the misuse loud (TypeError) instead of silent. Kept: `wandb_log_unique_prompts` (read by the GOLD trainer) and `callbacks` (consumption not provable mechanically). Signed-off-by: Daoyuan Li <94409450+DaoyuanLi2816@users.noreply.github.com>
kashif
approved these changes
Jun 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What does this PR do?
GOLDConfigcarries six fields andDistillationConfigthree that nothing in TRL reads:GOLDConfigwandb_entity,wandb_project,wandb_run_group,hub_model_revision,overwrite_hub_revision,push_to_hub_revisionDistillationConfigwandb_entity,wandb_project,wandb_run_groupVerified by searching the whole tree: no trainer references them, there's no
WANDB_*env-var wiring, no Hub-revision push logic, and no test sets them. They appear to be carried over from open-r1-style configs, whereinit_wandb_training()and a push-to-hub-revision callback consume them — those consumers were never ported to TRL.The result is the worst kind of API surface:
GOLDConfig(wandb_project="my-project")is accepted, documented, and does nothing, with no warning. This PR removes the nine fields (and their docstring entries) so misuse fails loudly with aTypeErrorinstead. Both configs live undertrl.experimental, which makes no backward-compatibility promises.Deliberately kept:
wandb_log_unique_prompts— read by the GOLD trainer;callbacks— consumption couldn't be ruled out mechanically.Happy to go the other way and wire the fields up (env-var setup à la open-r1's
init_wandb_training) instead of removing them, if you'd rather support them — let me know which direction you prefer.Found by extending the docstring/code audit (#5992 → #6011 → #6015 → #6022) to "config fields with zero readers".
Before submitting
Note
Low Risk
Experimental-module API cleanup only; no trainer or runtime behavior changes beyond stricter config construction.
Overview
Removes nine undocumented config knobs that were accepted by
GOLDConfigandDistillationConfigbut never read by any TRL trainer or callback.From
DistillationConfig:wandb_entity,wandb_project, andwandb_run_group(fields and docstring entries). FromGOLDConfig: the same three W&B fields plushub_model_revision,overwrite_hub_revision, andpush_to_hub_revision. Logging-related options that are actually used (e.g.wandb_log_unique_prompts,log_completions) are unchanged.Passing removed kwargs (e.g.
GOLDConfig(wandb_project="…")) now fails at construction instead of being silently ignored.Reviewed by Cursor Bugbot for commit 39be122. Bugbot is set up for automated code reviews on this repo. Configure here.