Skip to content

Commit 2907c49

Browse files
authored
Update the expected removal date for several deprecated API for release v0.14 (#6654)
* Update the expected removal date for several deprecated API * Revert the change in models/_utils.py * Remove removal date on pretrained=True * Update another message related to pretrained=True * Also update the warning in kwonly_to_pos_or_kw decorator * Update remaining message in _utils.py
1 parent 61f2032 commit 2907c49

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

torchvision/models/_utils.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ def wrapper(*args: Any, **kwargs: Any) -> D:
134134
keyword_only_kwargs = dict(zip(keyword_only_params, keyword_only_args))
135135
warnings.warn(
136136
f"Using {sequence_to_str(tuple(keyword_only_kwargs.keys()), separate_last='and ')} as positional "
137-
f"parameter(s) is deprecated since 0.13 and will be removed in 0.15. Please use keyword parameter(s) "
137+
f"parameter(s) is deprecated since 0.13 and may be removed in the future. Please use keyword parameter(s) "
138138
f"instead."
139139
)
140140
kwargs.update(keyword_only_kwargs)
@@ -206,13 +206,13 @@ def inner_wrapper(*args: Any, **kwargs: Any) -> M:
206206

207207
if not pretrained_positional:
208208
warnings.warn(
209-
f"The parameter '{pretrained_param}' is deprecated since 0.13 and will be removed in 0.15, "
209+
f"The parameter '{pretrained_param}' is deprecated since 0.13 and may be removed in the future, "
210210
f"please use '{weights_param}' instead."
211211
)
212212

213213
msg = (
214214
f"Arguments other than a weight enum or `None` for '{weights_param}' are deprecated since 0.13 and "
215-
f"will be removed in 0.15. "
215+
f"may be removed in the future. "
216216
f"The current behavior is equivalent to passing `{weights_param}={default_weights_arg}`."
217217
)
218218
if pretrained_arg:
@@ -250,7 +250,7 @@ def _ovewrite_value_param(param: str, actual: Optional[V], expected: V) -> V:
250250
class _ModelURLs(dict):
251251
def __getitem__(self, item):
252252
warnings.warn(
253-
"Accessing the model URLs via the internal dictionary of the module is deprecated since 0.13 and will "
254-
"be removed in 0.15. Please access them via the appropriate Weights Enum instead."
253+
"Accessing the model URLs via the internal dictionary of the module is deprecated since 0.13 and may "
254+
"be removed in the future. Please access them via the appropriate Weights Enum instead."
255255
)
256256
return super().__getitem__(item)

torchvision/transforms/_functional_video.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55

66
warnings.warn(
7-
"The 'torchvision.transforms._functional_video' module is deprecated since 0.12 and will be removed in 0.14. "
7+
"The 'torchvision.transforms._functional_video' module is deprecated since 0.12 and will be removed in the future. "
88
"Please use the 'torchvision.transforms.functional' module instead."
99
)
1010

torchvision/transforms/_transforms_video.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121

2222
warnings.warn(
23-
"The 'torchvision.transforms._transforms_video' module is deprecated since 0.12 and will be removed in 0.14. "
23+
"The 'torchvision.transforms._transforms_video' module is deprecated since 0.12 and will be removed in the future. "
2424
"Please use the 'torchvision.transforms' module instead."
2525
)
2626

0 commit comments

Comments
 (0)