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
+56Lines changed: 56 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -108,7 +108,63 @@ 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 `torch.load` without weights only parameter
115
+
116
+
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.
117
+
118
+
Migration Guide:
119
+
120
+
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.
135
+
136
+
Migration Guide:
137
+
138
+
For better maintainability and compatibility, please use the public function `torch.utils.data.dataloader.default_collate` instead.
139
+
140
+
### TOR201 Parameter `pretrained` is deprecated, please use `weights` instead.
141
+
142
+
The parameter `pretrained` has been deprecated in TorchVision models since PyTorch version 1.12.0. The `weights` parameter should be used instead.
143
+
144
+
```
145
+
model = SomeModel(weights='<path_or_identifier_to_weights>')
146
+
```
147
+
148
+
### TOR202 The transform `v2.ToTensor()` is deprecated and will be removed in a future release.
149
+
150
+
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)])`.
### TOR203 Consider replacing `import torchvision.models as models` with `from torchvision import models`.
157
+
158
+
Consider replacing `import torchvision.models as models` with `from torchvision import models` to improve clarity, maintainability, and adhere to best practices and reducing potential confusion with other modules or variables named `models`.
159
+
This can lead to namespace conflicts and explicit import style helps avoid such issues.
160
+
161
+
### TOR401 Detected DataLoader running with synchronized implementation
162
+
163
+
Running synchronized implementations on `DataLoader` can lead to loss in data loading performance, especially when dealing with large datasets. A viable solution is to set the `num_workers` parameter to be greater than 0 when initializing the DataLoader class. This would parallelize the loading operations and would significantly increase performance.
0 commit comments