ignite icon indicating copy to clipboard operation
ignite copied to clipboard

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

Open mikaylagawarecki opened this issue 11 months ago • 0 comments

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. https://github.com/pytorch/ignite/blob/0d8b8a1828eb00d40bb38018cca017ba3b13bc8b/ignite/handlers/lr_finder.py#L515 and https://github.com/pytorch/ignite/blob/0d8b8a1828eb00d40bb38018cca017ba3b13bc8b/ignite/handlers/param_scheduler.py#L848

mikaylagawarecki avatar Nov 15 '24 18:11 mikaylagawarecki