Skip to content

Backwards compability for torch.save in ModelCheckpoint #1244

@kilianyp

Description

@kilianyp

🚀 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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions