Skip to content

Removal schedule for legacy model builder API #7187

Open
@pmeier

Description

@pmeier

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions