-
Notifications
You must be signed in to change notification settings - Fork 15
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
FIX: explicitly set weights_only to avoid FutureWarning #193
Conversation
- If I'm understanding the Torch 2.4 changelog correctly, you just need to explicitly pass a value to weights_only. Since the default is alraedy False, I am just explicitly setting it here so this should be backward compatible
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @scott-huberty
We are loading a file we distribute, thus I think it's safe to keep loading with weights_only=False
.
I pushed 2 commits which should get the CIs green.
On the other hand.. |
https://pytorch.org/docs/stable/generated/torch.load.html Seems to suggest if we set to True we introduce security issues. I don't see any issue with just keeping it as default of false. |
I think it's the other way around. But I think they made/kept the default |
Sorry yeah oops mixed it up. But yeah I don't see any reason we can't just use weights_only as True. Is there any issue with this? I don't think we load any non PyTorch primitives. |
Well that's the part I don't know and am not familiar with.. but the unit tests seem to agree since they come back green locally with |
Agreed that ideally |
Let's go with Thanks @scott-huberty I'll cut a release tomorrow to get your CIs green. |
Thx @mscheltienne ! No rush in the meantime I'm just going make use of |
@scott-huberty 0.7 is out ;) Thanks! |
Closes #192
If I'm understanding the Torch 2.4 changelog correctly, you just need to explicitly pass a value to
weights_only
to suppress the warning. Since the default is alreadyFalse
, I am just explicitly setting it here, so this should be backward compatibleI'll double check that the CI installs 2.4 so we can make sure this fix works.
Maintainer, please confirm the following before merging: