Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
importer: fix usage after PyTorch update (#1555)
Unless requested otherwise, PyTorch no longer installs most of the header files under the caffe2 directory (see pytorch/pytorch#87986). This breaks our importer code since we need to use the `MakeGuard()` function to execute statements in the event of exceptions. To fix this issue, this patch implements a rudimentary version of PyTorch's ScopeGuard, where once the class variable goes out of scope, it executes a predefined method.
- Loading branch information