-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Fix torch compile, script, export #1031
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
Merged
Merged
Changes from all commits
Commits
Show all changes
58 commits
Select commit
Hold shift + click to select a range
643c0b6
Move tests
qubvel 7a937ab
Add compile test for encoders (to be optimized)
qubvel 9a7c768
densnet
qubvel 34b8533
dpn
qubvel a3618fa
efficientnet
qubvel e3f6c70
inceptionresnetv2
qubvel 20b28be
inceptionv4
qubvel d996165
mix-transformer
qubvel 9e38154
mobilenet
qubvel c6e5d53
mobileone
qubvel 5a76722
resnet
qubvel 36d056b
senet
qubvel aefcfd4
vgg
qubvel e9628bf
xception
qubvel 70262e5
Deprecate `timm-` encoders, remap to `tu-` most of them
qubvel 0b0b1c4
Add tiny encoders and compile mark
qubvel 4c11682
Add conftest
qubvel 70168b4
Fix features
qubvel 8aed7ef
Merge branch 'main' into torch-compile-export
qubvel 50c40d1
Add triggering compile tests on diff
qubvel 0764d5e
Remove marks
qubvel 7cab4be
Add test_compile stage to CI
qubvel 2622e0e
Update requirements
qubvel e12ee8d
Update makefile
qubvel da0cd19
Update get_stages
qubvel 7752969
Fix weight loading for deprecate encoders
qubvel 409b820
Fix weight loading for mobilenetv3
qubvel ae3cb8a
Format
qubvel ff278c9
Add compile test for models
qubvel a806147
Add torch.export test
qubvel aa5b088
Disable export tests for dpn and inceptionv4
qubvel df2f484
Disable export for timm-eff-net
qubvel 7157501
Huge fix for torch scripting (except Unet++ and UperNet)
qubvel 257da0b
Fix scripting
qubvel d4d4cf6
Add test for torch script
qubvel 3cb8198
Add torch_script test to CI
qubvel 4f65d8f
Fix
qubvel 70776ea
Fix timm-effnet encoders
qubvel 31bee79
Make from_pretrained strict by default
qubvel 556b3aa
Fix DeepLabV3 BC
qubvel f70d861
Fix scripting for encoders
qubvel ead24b4
Refactor test do not skip
qubvel d44509a
Fix encoders (mobilenet, inceptionv4)
qubvel b2c13f1
Update encoders table
qubvel 73809e3
Fix export test
qubvel bc1319e
Fix docs
qubvel d25dd47
Update warning
qubvel 4f3b37e
Move pretrained settings
qubvel 06199b0
Add BC for timm- encoders
qubvel 51e0a67
Fixing table
qubvel 524bcae
Update compile test
qubvel a2b97d8
Change compile backend to eager
qubvel 17a4b70
Update docs
qubvel 20564f2
Fixup
qubvel 5bbb1db
Fix batchnorm typo
qubvel d121fec
Add depth validation
qubvel 7bb9d37
Update segmentation_models_pytorch/encoders/__init__.py
qubvel da24de9
Style
qubvel 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 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
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
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
gitpython==3.1.44 | ||
packaging==24.2 | ||
pytest==8.3.4 | ||
pytest-xdist==3.6.1 | ||
pytest-cov==6.0.0 | ||
ruff==0.9.1 | ||
setuptools==75.8.0 |
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import torch | ||
|
||
|
||
@torch.jit.unused | ||
def is_torch_compiling(): | ||
try: | ||
return torch.compiler.is_compiling() | ||
except Exception: | ||
try: | ||
import torch._dynamo as dynamo # noqa: F401 | ||
|
||
return dynamo.is_compiling() | ||
except Exception: | ||
return False | ||
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.