-
Notifications
You must be signed in to change notification settings - Fork 21.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
[JIT] Fix torch.jit.script for functions with many decorators #87804
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/87804
Note: Links to docs will display an error until the docs builds have been completed. ✅ No Failures, 6 PendingAs of commit 5783621: This comment was automatically generated by Dr. CI and updates every 15 minutes. |
This pull request was exported from Phabricator. Differential Revision: D40726352 |
…h#87804) Summary: Pull Request resolved: pytorch#87804 Python's function parsing from the `ast` module records the line number of the function definition, not the first decorator. So this diff fixes crashes like this: ``` IndexError: vector::_M_range_check: __n (which is 10) >= this->size() (which is 8) ``` Test Plan: New unit test Differential Revision: D40726352 fbshipit-source-id: c12ba0007781ee3b7f4ec7efacabfe87d1125839
This pull request was exported from Phabricator. Differential Revision: D40726352 |
6bfb5eb
to
5783621
Compare
@pytorchbot merge (Initiating merge automatically since Phabricator Diff has merged) |
1 similar comment
@pytorchbot merge (Initiating merge automatically since Phabricator Diff has merged) |
Merge startedYour change will be merged once all checks pass (ETA 0-4 Hours). Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
Hey @mikeiovine. |
…h#87804) Summary: Python's function parsing from the `ast` module records the line number of the function definition, not the first decorator. So this diff fixes crashes like this: ``` IndexError: vector::_M_range_check: __n (which is 10) >= this->size() (which is 8) ``` Test Plan: New unit test Differential Revision: D40726352 Pull Request resolved: pytorch#87804 Approved by: https://github.com/tugsbayasgalan, https://github.com/davidberard98
…h#87804) Summary: Python's function parsing from the `ast` module records the line number of the function definition, not the first decorator. So this diff fixes crashes like this: ``` IndexError: vector::_M_range_check: __n (which is 10) >= this->size() (which is 8) ``` Test Plan: New unit test Differential Revision: D40726352 Pull Request resolved: pytorch#87804 Approved by: https://github.com/tugsbayasgalan, https://github.com/davidberard98
…h#87804) Summary: Python's function parsing from the `ast` module records the line number of the function definition, not the first decorator. So this diff fixes crashes like this: ``` IndexError: vector::_M_range_check: __n (which is 10) >= this->size() (which is 8) ``` Test Plan: New unit test Differential Revision: D40726352 Pull Request resolved: pytorch#87804 Approved by: https://github.com/tugsbayasgalan, https://github.com/davidberard98
Summary:
Python's function parsing from the
ast
module records the line number of the function definition, not the first decorator. So this diff fixes crashes like this:Test Plan: New unit test
Differential Revision: D40726352