Open kit1980 opened 3 weeks ago
I ended up specifying weights_only=False
in both places, as otherwise the tests fail.
This is still valuable as in a future PyTorch release weights_only
will default to True
, so the tests will break if weights_only
is not set explicitly.
Ideally investigation is needed if the full pickle functionality is logically required there, and if it's possible to change the code to make weights_only=True
work.
torch.load
withoutweights_only
parameter is unsafe. Explicitly setweights_only
to False only if you trust the data you load and full pickle functionality is needed, otherwise setweights_only=True
.If
weights_only=True
doesn't work for some cases, then explicitweights_only=False
should be used.Found with https://github.com/pytorch-labs/torchfix/