-
由 James Reed 提交于
Summary: Resolves https://github.com/pytorch/lockdown/issues/18 This implements NamedTuple by taking advantage of the existing `names` field in `TupleType`. TODO: This currently doesn't retain the NamedTuple-ness through serialization. Discussed with suo offline, we can probably make a way to define an anonymous NamedTuple in script (e.g. `NamedTuple('Foo', [('a', int), ('b', float), ('c', List[float])])` and serialize that TODO: implement support for calling the constructor with kwargs Pull Request resolved: https://github.com/pytorch/pytorch/pull/21428 Differential Revision: D15741564 Pulled By: jamesr66a fbshipit-source-id: c077cbcea1880675ca6deb340a9ec78f824a136c
4bcc72fe