Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
mikaylagawarecki opened this issue Nov 15, 2024 · 0 comments

Comments

@mikaylagawarecki
Copy link

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())

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant