-
Notifications
You must be signed in to change notification settings - Fork 31.2k
Update conversion mapping to separate renaming from converting #42254
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
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. |
molbap
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sweet update!
Cyrilvallez
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All right! Much simpler than before!
Did not check in details all the complex regex patterns for edge cases though, but they look similar to before
The only thing I'm really not a fan of, is the double WeightRenaming + WeightConverter for the same keys -> IMO if we need any Operation, then we should simply have a WeightConverter correctly specifying sources and targets
| if not targets_were_none and bool(len(self.source_keys) - 1) + bool(len(self.target_keys) - 1) >= 2: | ||
| if bool(len(self.source_keys) - 1) + bool(len(self.target_keys) - 1) >= 2: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: I'd rather have this without the bool - makes it harder to understand instead of simpler patterns IMO
Update the conversion:

to support torchao
