Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enable torch tracing by changing assertions in d2go forwards to allow…
… 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
- Loading branch information