-
-
Notifications
You must be signed in to change notification settings - Fork 692
Backwards compability for torch.save in ModelCheckpoint #1244
Copy link
Copy link
Closed
Labels
Description
🚀 Feature
Pytorch made some changes to torch.save (https://pytorch.org/docs/stable/generated/torch.save.html)
The 1.6 release of PyTorch switched torch.save to use a new zipfile-based file format. torch.load still retains the ability to load files in the old format. If for any reason you want torch.save to use the old format, pass the kwarg _use_new_zipfile_serialization=False.
It would be useful to have control over this flag when instantiating ModelCheckpoint.
Possible ways that I can think of:
- Have some *args, **kwargs passed on to the save function
- Be able to pass the save function itself to ModelCheckpoints
Reactions are currently unavailable