[DistillationTrainer refactor] Pin signature columns to ["prompt", "image", "images"]#6481
Open
qgallouedec wants to merge 1 commit into
Open
[DistillationTrainer refactor] Pin signature columns to ["prompt", "image", "images"]#6481qgallouedec wants to merge 1 commit into
["prompt", "image", "images"]#6481qgallouedec wants to merge 1 commit into
Conversation
|
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
63 tasks
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.
Item 17 (Group A, last) — stacked on PR 16. Part of #6449.
Align
_set_signature_columns_if_neededwith GRPO/RLOO verbatim: pin to["prompt", "image", "images"](with their exact comment). Drops the bespoke["prompt", "prompts", "prompt_attention_mask", "messages", "chat_template_kwargs", "tools"]list and thesuper()merge — the collator/generation only read thepromptcolumn now (messages gone at item 16), andprompts/prompt_attention_maskwere internal batch keys, never dataset columns.Runtime no-op (
remove_unused_columnsis forcedFalse); pure code alignment.Verified:
pytest tests/experimental/test_distillation_trainer.py— 39 passed; ruff clean.Note
Low Risk
No intended runtime change because column stripping is disabled; only the signature-column override logic changes.
Overview
DistillationTrainer._set_signature_columns_if_neededis rewritten to match GRPO and RLOO: it no longer callssuper()or merges a long custom column list, and instead sets_signature_columnsto["prompt", "image", "images"]when unset, with the same rationale comment as those trainers.The dropped names (
prompts,prompt_attention_mask,messages,chat_template_kwargs,tools, etc.) reflected old dataset/chat paths or collator batch keys, not columns the trainer pipeline still needs after the prior refactor.remove_unused_columnsstaysFalse, so training behavior should be unchanged—this is alignment and cleanup.Reviewed by Cursor Bugbot for commit 4f91a90. Bugbot is set up for automated code reviews on this repo. Configure here.