Commit c7225a2
Fix failing Github tests (#726)
Summary:
Pull Request resolved: #726
(1) CIFAR10 cuda tests were failing with the following message. [Example](https://github.com/pytorch/opacus/actions/runs/13079011269/job/36498002040#step:7:757).
> _pickle.UnpicklingError: Weights only load failed [...] In PyTorch 2.6, we changed the default value of the `weights_only` argument in `torch.load` from `False` to `True`. Re-running `torch.load` with `weights_only` set to `False` will likely succeed, but it can result in arbitrary code execution. Do it only if you got the file from a trusted source.
Specified weights_only=False in torch.load() and tests are passing.
(2) A similar issue was happening with multiple unit tests due to the change in behavior of `weights_only`. [Example](https://github.com/pytorch/opacus/actions/runs/13080274224/job/36502044189). Changed the `weights_only` setting where necessary.
(3) Black was requesting addition of commas when listing mutliple variable types. (Locally there were no issues, appeared only GithubActions). [Example](https://github.com/pytorch/opacus/actions/runs/13080274224/job/36502043210).
Reviewed By: EnayatUllah
Differential Revision: D68973109
fbshipit-source-id: 7fbe9702dcfc72b40fe95bb8a749d2163525231b1 parent 57f0349 commit c7225a2
File tree
5 files changed
+7
-7
lines changed- .github/workflows
- benchmarks/tests
- opacus
- grad_sample
- utils
5 files changed
+7
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
84 | 84 | | |
85 | 85 | | |
86 | 86 | | |
87 | | - | |
| 87 | + | |
88 | 88 | | |
89 | | - | |
| 89 | + | |
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
194 | 194 | | |
195 | 195 | | |
196 | 196 | | |
197 | | - | |
| 197 | + | |
198 | 198 | | |
199 | 199 | | |
200 | 200 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
| 30 | + | |
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
59 | | - | |
| 59 | + | |
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
603 | 603 | | |
604 | 604 | | |
605 | 605 | | |
606 | | - | |
| 606 | + | |
607 | 607 | | |
608 | 608 | | |
609 | 609 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | | - | |
| 42 | + | |
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| |||
0 commit comments