Commit 383b5d9
Use weights_only for load (#3796)
Summary:
`torch.load` without `weights_only` parameter is unsafe. Explicitly set `weights_only` to False only if you trust the data you load and full pickle functionality is needed, otherwise set `weights_only=True`.
If `weights_only=True` doesn't work for some cases, then explicit `weights_only=False` should be used.
Found with https://github.com/pytorch-labs/torchfix/
Pull Request resolved: #3796
Reviewed By: asadoughi
Differential Revision: D61824340
Pulled By: kit1980
fbshipit-source-id: bc013d06d4f368f730ffee6898e75fd0b0ff1d401 parent 95e0a66 commit 383b5d9
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
| 39 | + | |
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| |||
0 commit comments