Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removal schedule for legacy model builder API #7187

Open
pmeier opened this issue Feb 7, 2023 · 1 comment
Open

Removal schedule for legacy model builder API #7187

pmeier opened this issue Feb 7, 2023 · 1 comment

Comments

@pmeier
Copy link
Collaborator

pmeier commented Feb 7, 2023

Although our documentation is explicit

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:

  • 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."
    )
  • 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."
    )
  • 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:

  1. 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.
  2. 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.
  3. Keep everything as is.

My order of preference is 1. > 2. > 3.

@NicolasHug
Copy link
Member

NicolasHug commented Feb 7, 2023

The same applies to the private _functional_video.py and _tranforms_video.py files BTW (#6654)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants