Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[BC breaking change in torch] weights_only default flip for torch.load #3303

@mikaylagawarecki

Description

@mikaylagawarecki

We've flipped the default for the weights_only argument in torch.load to True in pytorch/pytorch, see here for details + documentation and this is coming in torch 2.6.

This is expected to be quite a BC-breaking change, especially if any torch.load calls are not loading state_dicts of plain tensors.

I see that ignite runs nightly CI as https://github.com/pytorch/ignite/pull/3299/files already addressed some of the torch.load calls in test cases.

However, I see a couple other torch.load calls without weights_only explicitly set and wanted to double check that these are passing with the flip :) e.g.

obj = torch.load(cache_filepath.as_posix())

and
objs = torch.load(cache_filepath.as_posix())

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions