-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Enable torch tracing by changing assertions in d2go forwards to allow for torch.fx.proxy.Proxy type. #4227
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
Closed
Conversation
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
Contributor
|
This pull request was exported from Phabricator. Differential Revision: D35518556 |
simonhollis
pushed a commit
to simonhollis/d2go
that referenced
this pull request
May 24, 2022
… for torch.fx.proxy.Proxy type. Summary: X-link: facebookresearch/detectron2#4227 Pull Request resolved: facebookresearch#241 Torch FX tracing propagates a type of `torch.fx.proxy.Proxy` through the graph. Existing type assertions in the d2go code base trigger during torch FX tracing, causing tracing to fail. This diff adds a helper function `is_fx_proxy()`, for checking for `torch.fx.proxy.Proxy` instances, then uses this to guard the existing assertions, thus enabling the tracing, as well as maintaining the originally intended functionality. Differential Revision: D35518556 fbshipit-source-id: 09e516e3c098000dea63ddaf3907648bcae5a1b1
simonhollis
pushed a commit
to simonhollis/d2go
that referenced
this pull request
Jul 19, 2022
… for torch.fx.proxy.Proxy type. Summary: X-link: facebookresearch/detectron2#4227 Pull Request resolved: facebookresearch#241 Torch FX tracing propagates a type of `torch.fx.proxy.Proxy` through the graph. Existing type assertions in the d2go code base trigger during torch FX tracing, causing tracing to fail. This diff adds a helper function `is_fx_proxy()`, for checking for `torch.fx.proxy.Proxy` instances, then uses this to guard the existing assertions, thus enabling the tracing, as well as maintaining the originally intended functionality. Differential Revision: D35518556 fbshipit-source-id: ed234bf6e6b1c306ef9670ffbcb5ae00376e2d03
simonhollis
pushed a commit
to simonhollis/d2go
that referenced
this pull request
Jul 20, 2022
… for torch.fx.proxy.Proxy type. Summary: X-link: facebookresearch/detectron2#4227 Pull Request resolved: facebookresearch#241 Torch FX tracing propagates a type of `torch.fx.proxy.Proxy` through the graph. Existing type assertions in the d2go code base trigger during torch FX tracing, causing tracing to fail. This diff adds a helper function `is_fx_proxy()`, for checking for `torch.fx.proxy.Proxy` instances, then uses this to guard the existing assertions, thus enabling the tracing, as well as maintaining the originally intended functionality. Differential Revision: D35518556 fbshipit-source-id: 7feb77561f140825a66d46de93d5ae67b02288cb
Contributor
|
This pull request was exported from Phabricator. Differential Revision: D35518556 |
wat3rBro
pushed a commit
to wat3rBro/detectron2-1
that referenced
this pull request
Jul 25, 2022
… for torch.fx.proxy.Proxy type. Summary: Pull Request resolved: facebookresearch#4227 X-link: facebookresearch/d2go#241 Torch FX tracing propagates a type of `torch.fx.proxy.Proxy` through the graph. Existing type assertions in the d2go code base trigger during torch FX tracing, causing tracing to fail. This diff adds a helper function `is_fx_proxy()`, for checking for `torch.fx.proxy.Proxy` instances, then uses this to guard the existing assertions, thus enabling the tracing, as well as maintaining the originally intended functionality. Differential Revision: D35518556 fbshipit-source-id: 7f1cc384a30d6f79772e68c28133e5420f966f06
acb5db1 to
e9ca479
Compare
simonhollis
pushed a commit
to simonhollis/d2go
that referenced
this pull request
Jul 26, 2022
… for torch.fx.proxy.Proxy type. Summary: X-link: facebookresearch/detectron2#4227 Pull Request resolved: facebookresearch#241 Torch FX tracing propagates a type of `torch.fx.proxy.Proxy` through the graph. Existing type assertions in the d2go code base trigger during torch FX tracing, causing tracing to fail. This diff adds a helper function `is_fx_proxy()`, for checking for `torch.fx.proxy.Proxy` instances, then uses this to guard the existing assertions, thus enabling the tracing, as well as maintaining the originally intended functionality. Reviewed By: wat3rBro Differential Revision: D35518556 fbshipit-source-id: 539c8c0ccb39c3e2ba953ccda72103d847ad0667
simonhollis
pushed a commit
to simonhollis/d2go
that referenced
this pull request
Aug 2, 2022
… for torch.fx.proxy.Proxy type. Summary: X-link: facebookresearch/detectron2#4227 Pull Request resolved: facebookresearch#241 Torch FX tracing propagates a type of `torch.fx.proxy.Proxy` through the graph. Existing type assertions in the d2go code base trigger during torch FX tracing, causing tracing to fail. This adds a check for FX tracing in progress and adds a helper function `assert_fx_safe()`, that can be used in place of a standard assertion. This function only applies the assertion if one is not tracing, allowing d2go assertion tests to be compatible with FX tracing. Reviewed By: wat3rBro Differential Revision: D35518556 fbshipit-source-id: b5d65165f271722af24e3dd9d33b3e37e4cf0e34
simonhollis
pushed a commit
to simonhollis/d2go
that referenced
this pull request
Aug 2, 2022
… for torch.fx.proxy.Proxy type. Summary: X-link: facebookresearch/detectron2#4227 Pull Request resolved: facebookresearch#241 Torch FX tracing propagates a type of `torch.fx.proxy.Proxy` through the graph. Existing type assertions in the d2go code base trigger during torch FX tracing, causing tracing to fail. This adds a check for FX tracing in progress and adds a helper function `assert_fx_safe()`, that can be used in place of a standard assertion. This function only applies the assertion if one is not tracing, allowing d2go assertion tests to be compatible with FX tracing. Reviewed By: wat3rBro Differential Revision: D35518556 fbshipit-source-id: 524a3dbcb42736789580459bed2c9323b91a5615
… for torch.fx.proxy.Proxy type. Summary: Pull Request resolved: facebookresearch#4227 X-link: facebookresearch/d2go#241 Torch FX tracing propagates a type of `torch.fx.proxy.Proxy` through the graph. Existing type assertions in the d2go code base trigger during torch FX tracing, causing tracing to fail. This adds a check for FX tracing in progress and adds a helper function `assert_fx_safe()`, that can be used in place of a standard assertion. This function only applies the assertion if one is not tracing, allowing d2go assertion tests to be compatible with FX tracing. Reviewed By: wat3rBro Differential Revision: D35518556 fbshipit-source-id: 82e6f1af479828176baba19bfa19a3272aca25af
Contributor
|
This pull request was exported from Phabricator. Differential Revision: D35518556 |
e9ca479 to
401957f
Compare
simonhollis
pushed a commit
to simonhollis/d2go
that referenced
this pull request
Aug 15, 2022
… for torch.fx.proxy.Proxy type. Summary: X-link: facebookresearch/detectron2#4227 Pull Request resolved: facebookresearch#241 Torch FX tracing propagates a type of `torch.fx.proxy.Proxy` through the graph. Existing type assertions in the d2go code base trigger during torch FX tracing, causing tracing to fail. This adds a check for FX tracing in progress and adds a helper function `assert_fx_safe()`, that can be used in place of a standard assertion. This function only applies the assertion if one is not tracing, allowing d2go assertion tests to be compatible with FX tracing. Differential Revision: D35518556 fbshipit-source-id: 8f5181fccf6cdd29ff2fea0d26385a65a08df76e
simonhollis
pushed a commit
to simonhollis/d2go
that referenced
this pull request
Aug 16, 2022
… for torch.fx.proxy.Proxy type. Summary: X-link: facebookresearch/detectron2#4227 Pull Request resolved: facebookresearch#241 Torch FX tracing propagates a type of `torch.fx.proxy.Proxy` through the graph. Existing type assertions in the d2go code base trigger during torch FX tracing, causing tracing to fail. This adds a check for FX tracing in progress and adds a helper function `assert_fx_safe()`, that can be used in place of a standard assertion. This function only applies the assertion if one is not tracing, allowing d2go assertion tests to be compatible with FX tracing. Reviewed By: wat3rBro Differential Revision: D35518556 fbshipit-source-id: c866f49a2be8d04bb6ed646ab07004cbdb582938
simonhollis
pushed a commit
to simonhollis/d2go
that referenced
this pull request
Aug 17, 2022
… for torch.fx.proxy.Proxy type. Summary: X-link: facebookresearch/detectron2#4227 Pull Request resolved: facebookresearch#241 Torch FX tracing propagates a type of `torch.fx.proxy.Proxy` through the graph. Existing type assertions in the d2go code base trigger during torch FX tracing, causing tracing to fail. This adds a check for FX tracing in progress and adds a helper function `assert_fx_safe()`, that can be used in place of a standard assertion. This function only applies the assertion if one is not tracing, allowing d2go assertion tests to be compatible with FX tracing. Reviewed By: wat3rBro Differential Revision: D35518556 fbshipit-source-id: e8dbeb2538c2ce9042e5f1c481b30f48b3c8988f
facebook-github-bot
pushed a commit
to facebookresearch/d2go
that referenced
this pull request
Aug 18, 2022
… for torch.fx.proxy.Proxy type. Summary: X-link: facebookresearch/detectron2#4227 Pull Request resolved: #241 Torch FX tracing propagates a type of `torch.fx.proxy.Proxy` through the graph. Existing type assertions in the d2go code base trigger during torch FX tracing, causing tracing to fail. This adds a check for FX tracing in progress and adds a helper function `assert_fx_safe()`, that can be used in place of a standard assertion. This function only applies the assertion if one is not tracing, allowing d2go assertion tests to be compatible with FX tracing. Reviewed By: wat3rBro Differential Revision: D35518556 fbshipit-source-id: a9b5d3d580518ca74948544973ae89f8b9de3282
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
CLA Signed
This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
fb-exported
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.
Summary:
X-link: facebookresearch/d2go#241
Torch FX tracing propagates a type of
torch.fx.proxy.Proxythrough the graph.Existing type assertions in the d2go code base trigger during torch FX tracing, causing tracing to fail.
This diff adds a helper function
is_fx_proxy(), for checking fortorch.fx.proxy.Proxyinstances, then uses this to guard the existing assertions, thus enabling the tracing, as well as maintaining the originally intended functionality.Differential Revision: D35518556