pytorch
9e97e924 - Fix mobile type resolution in unpickling (#37425)

Commit
5 years ago
Fix mobile type resolution in unpickling (#37425) Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/37425 The mobile type resolver that we inject into the unpickler currently creates a dummy type for everything, even built-in types like List[int]. This PR restricts that behavior to types that start with `__torch__`, and uses the mobile type parser for everything else. I don't like this solution because it relies on a fragile invariant that all "class-like" types have qualified names that start with `__torch__`. I think the long term solution is to just re-use the script type parser here. Test Plan: Imported from OSS Differential Revision: D21291331 Pulled By: suo fbshipit-source-id: c94709bcbd1bac75336e033fd9d3afa6656b0a77
Author
suo suo
Parents
Loading