Skip to content

docs: explain TorchScript model.pt load failure (central directory error)#8807

Open
mahi-mullapudi wants to merge 1 commit into
triton-inference-server:mainfrom
mahi-mullapudi:docs/torchscript-load-error
Open

docs: explain TorchScript model.pt load failure (central directory error)#8807
mahi-mullapudi wants to merge 1 commit into
triton-inference-server:mainfrom
mahi-mullapudi:docs/torchscript-load-error

Conversation

@mahi-mullapudi

Copy link
Copy Markdown

Fixes #7497

Summary

Users hit a confusing error when loading a PyTorch model into the LibTorch backend:

PytorchStreamReader failed reading zip archive: failed finding central directory

This happens when the supplied model.pt is not a TorchScript artifact (for example an eager-mode module or a bare state_dict saved with torch.save). The current docs do not explain this requirement, so the error is hard to diagnose.

Changes

  • docs/user_guide/model_repository.md: add a note to the TorchScript Models section explaining that model.pt must be produced with torch.jit.script()/torch.jit.trace() and torch.jit.save(), shows the exact error users see when it is not, and tells them how to fix it.

Notes

  • Documentation-only change.

…ror)

Signed-off-by: Mahi M <12618818+mahi-mullapudi@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant