Fix no split modules underlying modules#27090
Merged
SunMarc merged 5 commits intohuggingface:mainfrom Oct 27, 2023
Merged
Conversation
|
The documentation is not available anymore as the PR was closed or merged. |
ArthurZucker
approved these changes
Oct 27, 2023
Collaborator
ArthurZucker
left a comment
There was a problem hiding this comment.
Thanks for the prompt fix on this tricky bug! 🔥
Co-authored-by: Arthur <48595927+ArthurZucker@users.noreply.github.com>
EduardoPach
pushed a commit
to EduardoPach/transformers
that referenced
this pull request
Nov 19, 2023
* fix no split * style * remove comm * Update src/transformers/modeling_utils.py Co-authored-by: Arthur <48595927+ArthurZucker@users.noreply.github.com> * rename modules --------- Co-authored-by: Arthur <48595927+ArthurZucker@users.noreply.github.com>
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 do ?
This PR fixes
_get_no_split_modulesintroduced in #26949. Basically, we don't check the children modules if they appear in_no_split_modules. By doing that, we can decide to not split a children module (can be aPretrainedModel) without having to check if its_no_split_modulesis set or not. This is particularly useful as we don't necessarily want to set it (small model, can't be split ...).This PR along with this one should also fix the issues in the CI