Skip to content

Fix percentage formatting in help messages for gradient checkpointing, Liger Kernel, and empty cache steps#44100

Merged
qgallouedec merged 1 commit intomainfrom
fix-help-training-args
Feb 17, 2026
Merged

Fix percentage formatting in help messages for gradient checkpointing, Liger Kernel, and empty cache steps#44100
qgallouedec merged 1 commit intomainfrom
fix-help-training-args

Conversation

@qgallouedec
Copy link
Member

@qgallouedec qgallouedec commented Feb 17, 2026

In huggingface/trl#5112 a user reported that trl sft --help fails

It's because three inherited args from TrainingArguments (torch_empty_cache_steps, gradient_checkpointing and use_liger_kernel)help strings include bare % which break argparse formatting on Python 3.13. This PR fixes it.

Copy link
Member

@stevhliu stevhliu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for fixing! this should also close #43980

@qgallouedec
Copy link
Member Author

ah right sorry for the duplicate

@qgallouedec qgallouedec enabled auto-merge (squash) February 17, 2026 17:22
@qgallouedec qgallouedec merged commit 4e0573b into main Feb 17, 2026
26 checks passed
@qgallouedec qgallouedec deleted the fix-help-training-args branch February 17, 2026 17:27
@HuggingFaceDocBuilderDev

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.

@albertvillanova
Copy link
Member

Thanks, glad to see this has been already fixed!

For future reference, in most OSS workflows the usual practice is to keep the earlier PR open and mark the later one as a duplicate before closing it. That helps preserve the original discussion context and avoids losing review history on the first contribution.

Not a big deal at all, just mentioning it for consistency going forward.

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.

4 participants