Fix logic in setting self.fsdp when it is False#41974
Merged
SunMarc merged 1 commit intohuggingface:mainfrom Nov 6, 2025
Merged
Fix logic in setting self.fsdp when it is False#41974SunMarc merged 1 commit intohuggingface:mainfrom
SunMarc merged 1 commit intohuggingface:mainfrom
Conversation
SunMarc
approved these changes
Nov 4, 2025
Member
SunMarc
left a comment
There was a problem hiding this comment.
Thanks for spotting this ! In which cases fsdp is set to False automatically ? Maybe we can fix that also
|
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. |
Contributor
Author
Thank you for reviewing the change. It was set in my code base (outside transformers) and I have it fixed (set to None) already. |
auto-merge was automatically disabled
November 6, 2025 02:34
Head branch was pushed to by a user without write access
Abdennacer-Badaoui
pushed a commit
to Abdennacer-Badaoui/transformers
that referenced
this pull request
Nov 10, 2025
Co-authored-by: Roy Chan <roy@Roys-MacBook-Air.local>
SangbumChoi
pushed a commit
to SangbumChoi/transformers
that referenced
this pull request
Jan 23, 2026
Co-authored-by: Roy Chan <roy@Roys-MacBook-Air.local>
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?
This PR fixes the logic in setting
self.fsdpin_process_fsdp_argsin src/transformers/training_args.py. In the original logic, whenself.fsdpis False, it will not be converted to list, and cause the later logic below failed becauseself.fsdpis a boolean (False).This diff fixes it by initializing it to list.
Who can review?
@SunMarc