Skip to content

Commit 4dce5e9

Browse files
committed
minor changes
1 parent d5ffd82 commit 4dce5e9

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

README.md

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ Migration guide:
108108
This function is deprecated. Use the `torch.nn.attention.sdpa_kernel` context manager instead.
109109

110110
Migration guide:
111+
111112
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`.
112113

113114
### TOR102 Unsafe use of function
@@ -117,6 +118,7 @@ Each boolean input parameter (defaulting to true unless specified) of `sdp_kerne
117118
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.
118119

119120
Migration Guide:
121+
120122
Explicitly set `weights_only=False` only if you trust the data you load and full pickle functionality is needed,
121123

122124
```
@@ -126,31 +128,36 @@ otherwise set `weights_only=True`.
126128
```
127129
torch.load('<path_to_file>', weights_only=True)
128130
```
131+
129132
### TOR104 Use of non-public function
130133

131134
#### torch.utils.data._utils.collate.default_collate
132135

133136
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.
134137

135138
Migration Guide:
139+
136140
For better maintainability and compatibility, please use the public function `torch.utils.data.dataloader.default_collate` instead.
137141

138142
### TOR201 Use of deprecated parameter
139143

140144
#### Model(pretrained=True)
141145

142-
The parameter `pretrained` has been deprecated in TorchVision models since PyTorch version 1.12.0. The `weights` parameter should be used instead
146+
The parameter `pretrained` has been deprecated in TorchVision models since PyTorch version 1.12.0. The `weights` parameter should be used instead.
147+
143148
```
144149
model = SomeModel(weights='<path_or_identifier_to_weights>')
145150
```
151+
146152
### TOR202 Use of deprecated function
147153

148154
#### transform v2.ToTensor()
149155

150-
The `transform v2.ToTensor()` is deprecated and will be removed in a future release.
151-
Instead, please use `v2.Compose([v2.ToImage(), v2.ToDtype(torch.float32, scale=True)])`.
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)])`.
157+
152158
```
153159
transform = v2.Compose([v2.ToImage(),v2.ToDtype(torch.float32, scale=True)])
154160
```
161+
155162
## License
156163
TorchFix is BSD License licensed, as found in the LICENSE file.

0 commit comments

Comments
 (0)