-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Set weights_only
in tests to avoid warnings in PyTorch 2.4
#20057
Conversation
⚡ Required checks status: All passing 🟢Groups summary🟢 pytorch_lightning: Tests workflow
These checks are required after the changes to 🟢 pytorch_lightning: Azure GPU
These checks are required after the changes to 🟢 lightning_fabric: CPU workflowThese checks are required after the changes to 🟢 lightning_fabric: Azure GPU
These checks are required after the changes to Thank you for your contribution! 💜
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #20057 +/- ##
=======================================
Coverage 90% 90%
=======================================
Files 266 266
Lines 22939 22939
=======================================
Hits 20720 20720
Misses 2219 2219 |
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.
LGTM !
What does this PR do?
PyTorch wants to flip the default of
torch.load(..., weights_only=)
to True in the future. In 2.4, they start raising a FutureWarning if you're not explicitly setting this argument to either True or False. This is the case in some of our tests. Since we have a strict setting that FutureWarning will fail tests, we have to set this flag now everywhere we calltorch.load()
.Part of #20010.
cc @Borda