You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+49Lines changed: 49 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -108,7 +108,56 @@ Migration guide:
108
108
This function is deprecated. Use the `torch.nn.attention.sdpa_kernel` context manager instead.
109
109
110
110
Migration guide:
111
+
111
112
Each boolean input parameter (defaulting to true unless specified) of `sdp_kernel` corresponds to a `SDPBackened`. If the input parameter is true, the corresponding backend should be added to the input list of `sdpa_kernel`.
112
113
114
+
### TOR102 Unsafe use of function
115
+
116
+
#### torch.load
117
+
118
+
The use of `torch.load` without the `weights_only` parameter is unsafe. Loading an untrusted pickle file may lead to the execution of arbitrary malicious code and potential security issues.
119
+
120
+
Migration Guide:
121
+
122
+
Explicitly set `weights_only=False` only if you trust the data you load and full pickle functionality is needed,
Public functions are well-documented and supported by the library maintainers and the use of the non-public function `torch.utils.data._utils.collate.default_collate` is discouraged as it can can change without notice in future versions, leading to potential breakage in your code.
137
+
138
+
Migration Guide:
139
+
140
+
For better maintainability and compatibility, please use the public function `torch.utils.data.dataloader.default_collate` instead.
141
+
142
+
### TOR201 Use of deprecated parameter
143
+
144
+
#### Model(pretrained=True)
145
+
146
+
The parameter `pretrained` has been deprecated in TorchVision models since PyTorch version 1.12.0. The `weights` parameter should be used instead.
147
+
148
+
```
149
+
model = SomeModel(weights='<path_or_identifier_to_weights>')
150
+
```
151
+
152
+
### TOR202 Use of deprecated function
153
+
154
+
#### transform v2.ToTensor()
155
+
156
+
The `transform v2.ToTensor()` is deprecated and will be removed in a future release. Instead, please use `v2.Compose([v2.ToImage(), v2.ToDtype(torch.float32, scale=True)])`.
0 commit comments