-
Notifications
You must be signed in to change notification settings - Fork 859
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
Use weights_only for load #3073
base: master
Are you sure you want to change the base?
Conversation
The actual changes are in the first commit. |
CI should pass..not sure why it was failing.. Hopefully works this time |
@msaroufim This needs some debugging. Its failing everytime |
@agunapal that's fine I think this is important to look at regardless |
Seems like weights_only is not working in this test:
Will take a look later |
Description
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/
Type of change
Feature/Issue validation/testing
This should be a no-op.