Skip to content

Remove silently-ignored W&B/Hub fields from GOLD and Distillation configs#6023

Open
DaoyuanLi2816 wants to merge 1 commit into
huggingface:mainfrom
DaoyuanLi2816:fix/remove-silently-ignored-config-fields
Open

Remove silently-ignored W&B/Hub fields from GOLD and Distillation configs#6023
DaoyuanLi2816 wants to merge 1 commit into
huggingface:mainfrom
DaoyuanLi2816:fix/remove-silently-ignored-config-fields

Conversation

@DaoyuanLi2816

@DaoyuanLi2816 DaoyuanLi2816 commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

What does this PR do?

GOLDConfig carries six fields and DistillationConfig three that nothing in TRL reads:

Config Silently-ignored fields
GOLDConfig wandb_entity, wandb_project, wandb_run_group, hub_model_revision, overwrite_hub_revision, push_to_hub_revision
DistillationConfig wandb_entity, wandb_project, wandb_run_group

Verified 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, where init_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 a TypeError instead. Both configs live under trl.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

  • Did you read the contributor guideline?
  • Was this discussed/approved via a GitHub issue? (N/A — small experimental-module cleanup; alternative direction offered above.)
  • Did you make sure to update the documentation with your changes? (Docstring entries removed together with the fields.)
  • Did you write any new necessary tests? (N/A — removal only.)

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 GOLDConfig and DistillationConfig but never read by any TRL trainer or callback.

From DistillationConfig: wandb_entity, wandb_project, and wandb_run_group (fields and docstring entries). From GOLDConfig: the same three W&B fields plus hub_model_revision, overwrite_hub_revision, and push_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.

…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>
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.

2 participants