chore(typing): added modeling_utils to ty#45425
Merged
tarekziade merged 11 commits intomainfrom Apr 27, 2026
Merged
Conversation
e61b897 to
d46cd16
Compare
|
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. |
Collaborator
Author
|
see #45458 |
vasqu
reviewed
Apr 15, 2026
Contributor
vasqu
left a comment
There was a problem hiding this comment.
Some initial comments: I think there are few potentially breaking changes so let's be careful
| if not isinstance(config, PreTrainedConfig): | ||
| config_path = config if config is not None else pretrained_model_name_or_path | ||
| config, model_kwargs = cls.config_class.from_pretrained( | ||
| config_class = cls.config_class |
Contributor
There was a problem hiding this comment.
Hmm, out of scope but maybe could be a good static rule to always define it
73aea30 to
a559d96
Compare
vasqu
approved these changes
Apr 23, 2026
Contributor
vasqu
left a comment
There was a problem hiding this comment.
Just some smaller stuff left but looks good overall 🤗
9200ee2 to
cc3c90a
Compare
cc3c90a to
eeb9fb2
Compare
Co-authored-by: Anton Vlasjuk <73884904+vasqu@users.noreply.github.com>
Member
|
this PR broke TRL's CI, I'm investigating |
ArthurZucker
pushed a commit
that referenced
this pull request
Apr 28, 2026
* chore(typing): added modeling_utils to ty * revert uneeded setattr * refine the skill with what we have learned here * revert change on skill * @vasqu reviews * added a small helper for splitting the attention impl * remove unneeded ty check * added a comment * Update src/transformers/utils/generic.py Co-authored-by: Anton Vlasjuk <73884904+vasqu@users.noreply.github.com> * fix trailng spaces from the Github UI edit --------- Co-authored-by: Anton Vlasjuk <73884904+vasqu@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 PR do?
Adds type checking to
modeling_utils.py