Skip to content

Commit c73095e

Browse files
James Reedfacebook-github-bot
authored andcommitted
Add note to serialization docs about zipfile format (pytorch#40288)
Summary: Pull Request resolved: pytorch#40288 Test Plan: Imported from OSS Differential Revision: D22140324 Pulled By: jamesr66a fbshipit-source-id: 01d7aa642ed2f4e4bdac4b7f3223bf4d7e62fd4d
1 parent 73a156e commit c73095e

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

docs/source/notes/serialization.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,9 @@ Then later::
3232
However in this case, the serialized data is bound to the specific classes
3333
and the exact directory structure used, so it can break in various ways when
3434
used in other projects, or after some serious refactors.
35+
36+
.. note::
37+
The 1.6 release of PyTorch switched ``torch.save`` to use a new
38+
zipfile-based file format. ``torch.load`` still retains the ability to
39+
load files in the old format. If for any reason you want ``torch.save``
40+
to use the old format, pass the kwarg ``_use_new_zipfile_serialization=False``.

0 commit comments

Comments
 (0)