Skip to content
This repository has been archived by the owner on Feb 16, 2022. It is now read-only.

Support for PyTorch checkpoints as serialization format #26

Open
duckontheweb opened this issue Sep 2, 2021 · 2 comments
Open

Support for PyTorch checkpoints as serialization format #26

duckontheweb opened this issue Sep 2, 2021 · 2 comments
Assignees
Labels
addition Involves an addition to the spec discussion needed Requires further discussion/input before implementing

Comments

@duckontheweb
Copy link
Collaborator

Problem Description

The spec currently supports only ONNX format for serializing models, but many model developers may be using PyTorch checkpoint files to save their files already. Supporting PyTorch checkpoint files might give consumers of the model who are also using PyTorch an easier path to running the model for generating predictions, or for loading the model to re-train.

Proposal

This issue exists to discuss whether we should add PyTorch checkpoint files as a supported serialization format in the Runtime fragment, and what changes would need to be made to that section to accommodate this addition.

@duckontheweb duckontheweb added discussion needed Requires further discussion/input before implementing addition Involves an addition to the spec labels Sep 2, 2021
@duckontheweb duckontheweb self-assigned this Sep 2, 2021
@duckontheweb
Copy link
Collaborator Author

cc: @sfoucher

@calebrob6 I believe you had voiced a concern early on that PyTorch checkpoints might not capture enough information to be universally useful; maybe you can weigh in on this issue as well.

@ymoisan
Copy link

ymoisan commented Sep 8, 2021

About "concern early on that PyTorch checkpoints might not capture enough information to be universally useful" we may be interested in supporting Model ARchives (.mar) instead of PyTorch checkpoints. Torchserve's first step is to "... convert model data from PyTorch data format (.pth) file to model archive format (.mar) file." Looks like a lot of stuff can be crammed in a MAR file.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
addition Involves an addition to the spec discussion needed Requires further discussion/input before implementing
Projects
None yet
Development

No branches or pull requests

2 participants