Skip to content

Add _get_signature_columns method to allow custom trainers to override column filtering#43663

Open
abigailtech wants to merge 1 commit intohuggingface:mainfrom
abigailtech:fix-remove-unused-columns
Open

Add _get_signature_columns method to allow custom trainers to override column filtering#43663
abigailtech wants to merge 1 commit intohuggingface:mainfrom
abigailtech:fix-remove-unused-columns

Conversation

@abigailtech
Copy link
Copy Markdown

Adds _get_signature_columns method that custom trainers can override to specify which columns to preserve when remove_unused_columns=True.

Currently, TRL trainers (DPO, GRPO) must override _set_signature_columns_if_needed entirely just to change the column list. This PR extracts the column logic into a separate overridable method.

Fixes #43598

@Rocketknight1
Copy link
Copy Markdown
Member

cc @SunMarc

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.

Revisit remove_unused_column in Trainer for better customizability

2 participants