-
Notifications
You must be signed in to change notification settings - Fork 7.1k
Description
Although our documentation is explicit
Line 82 in a05d817
Note that the ``pretrained`` parameter is now deprecated, using it will emit warnings and will be removed on v0.15. |
our runtime warnings are really vague:
vision/torchvision/models/_utils.py
Lines 135 to 139 in ecbed7b
warnings.warn( f"Using {sequence_to_str(tuple(keyword_only_kwargs.keys()), separate_last='and ')} as positional " f"parameter(s) is deprecated since 0.13 and may be removed in the future. Please use keyword parameter(s) " f"instead." ) vision/torchvision/models/_utils.py
Lines 208 to 211 in ecbed7b
warnings.warn( f"The parameter '{pretrained_param}' is deprecated since 0.13 and may be removed in the future, " f"please use '{weights_param}' instead." ) vision/torchvision/models/_utils.py
Lines 213 to 217 in ecbed7b
msg = ( f"Arguments other than a weight enum or `None` for '{weights_param}' are deprecated since 0.13 and " f"may be removed in the future. " f"The current behavior is equivalent to passing `{weights_param}={default_weights_arg}`." )
Apart from not committing to an explicit removal date, we are not even committing to removing this in general, i.e.
may be removed
In #7176 (comment) we decided to not remove this functionality together with all other scheduled removals for 0.15.
However, we should decide on the future of this. Here are some options that I see:
- Make the date in the runtime warnings explicit and remove afterwards. Abiding by our own BC policy, we probably need to use 0.17 as removal date. At that point, users saw the warning for 4 releases and thus roughly 1 year, which gave them plenty time to migrate.
- Remove the documentation of the legacy API, but keep supporting it silently, i.e. no warnings. Going this route would mean that new users won't know about the legacy API, but old code doesn't need to be updated.
- Keep everything as is.
My order of preference is 1. > 2. > 3.