pytorch
c357f8b8 - [package] make torch.package produce unified format (#51826)

Commit
4 years ago
[package] make torch.package produce unified format (#51826) Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/51826 Looks like this: ``` resnet.pt ├── .data # Data folder named so it can't clash with torch.package codemodules. │ │ # Names/extensions automatically added to avoid namingconflicts. │ ├── 94286146172688.storage # tensor data │ ├── 94286146172784.storage │ ├── extern_modules # torch.package metadata │ ├── version # version metadata │ └── ... ├── model # package pickled model created w/ │ │ # exporter.save_pickel('model','model.pkl', resnet_model) │ └── model.pkl └── torchvision # all code dependencies for packaged picked └── models # models are captured as source files ├── resnet.py └── utils.py ``` Since `version` is hardcoded in our zip reader/writer implementation, add it as an option that defaults to "version" but accepts other locations for putting the version metadata. Test Plan: Imported from OSS Reviewed By: zdevito Differential Revision: D26295649 Pulled By: suo fbshipit-source-id: 2d75feeb7de0f78196b4d0b6e2b814a7d58bd1dd
Author
suo suo
Parents
Loading