-
Notifications
You must be signed in to change notification settings - Fork 24.7k
Closed
Labels
module: 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
Milestone
Description
🚀 The feature, motivation and pitch
pytorch.load
with weights_only=True
allows for loading of lists & dicts
I would expect the builtin set
to be just as safe as a dict
Alternatives
Another alternative would be to convert sets to lists before saving, then converting back to a set when loading if the model needs a set internally
Additional context
WeightsUnpickler error: Unsupported global: GLOBAL builtins.set was not an allowed global by default. Please use `torch.serialization.add_safe_globals([set])` to allowlist this global if you trust this class/function.
cc @mruberry @mikaylagawarecki @seemethere @malfet @pytorch/pytorch-dev-infra
kit1980
Metadata
Metadata
Assignees
Labels
module: 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
Type
Projects
Status
Done