-
Notifications
You must be signed in to change notification settings - Fork 27.4k
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
🚨🚨🚨 fix(Mask2Former): torch export 🚨🚨🚨 #34393
Merged
ArthurZucker
merged 9 commits into
huggingface:main
from
philkuz:torch_export_mask2former
Nov 19, 2024
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
5367e8b
fix(Mask2Former): torch export
philkuz 01bfc41
revert level_start_index and create a level_start_index_list
philkuz a3f8377
Add a comment to explain the level_start_index_list
philkuz 183d1fc
Address comment
philkuz 609de26
add torch.export.export test
philkuz 99e90b2
rename arg
philkuz 104b16d
remove spatial_shapes
philkuz a341d60
Use the version check from pytorch_utils
philkuz 704b79f
[run_slow] mask2former
philkuz File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
Oops, something went wrong.
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.
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.
changing the name is a breaking change, we should probably have a deprecation cycle no?
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.
if not, we can add 🔴 as I think the motivation is strong enough.
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.
Hmm, I suppose it is an internal module of the model, not sure if it is intended to be used elsewhere, let me know if I'm wrong
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.
Isn't changing the logic, but keeping both
spatial_shapes
andspatial_shapes_list
already a breaking change?Sure there's some question of whether users can rely on internal Modules of transformers models, but also if a user doesn't pass a value for
spatial_shapes_list
this code will fail as L939 will try to iterate over a None object.BTW seems like the changes in #33600 already violate this contract(see this line)? I followed that PR as a guide on what I should change here.
It seems like the proper way forward is to add a 🔴 here.
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.
What's the path forward @ArthurZucker ?
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.
Bumping this again after the weekend. I'm not familiar with Huggingface's policies of
Could you provide a recommendation on where we should take this PR?
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.
Usually even if a module is
Internal
people still end up using it 😅This IS a breaking change, but acceptable IMO. Let's use some 🚨 on the PR title to make sure we communicate about it on the release!