-
Notifications
You must be signed in to change notification settings - Fork 24.8k
Closed
Labels
module: pickleProblems related to pickling of PyTorch objectsProblems related to pickling of PyTorch objectsmodule: serializationIssues related to serialization (e.g., via pickle, or otherwise) of PyTorch objectsIssues related to serialization (e.g., via pickle, or otherwise) of PyTorch objectstriagedThis issue has been looked at a team member, and triaged and prioritized into an appropriate moduleThis issue has been looked at a team member, and triaged and prioritized into an appropriate module
Description
🐛 Bug
torch.Size objects (returned by Tensor.shape) are not pickleable in Python 2.7. They can be pickled in Python 3.
To Reproduce
import torch
import pickle
pickle.dumps(torch.randn(10).shape) # TypeError: can't pickle Size objects
Environment
PyTorch 1.0.1.post2 (but I believe it also is present in master as of 5/22/19)
Python 2.7.15 on Mac OS X
Metadata
Metadata
Assignees
Labels
module: pickleProblems related to pickling of PyTorch objectsProblems related to pickling of PyTorch objectsmodule: serializationIssues related to serialization (e.g., via pickle, or otherwise) of PyTorch objectsIssues related to serialization (e.g., via pickle, or otherwise) of PyTorch objectstriagedThis issue has been looked at a team member, and triaged and prioritized into an appropriate moduleThis issue has been looked at a team member, and triaged and prioritized into an appropriate module