Skip to content

Changes to the deprecation window in 1.8+ #15049

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

Closed
2 tasks
awaelchli opened this issue Oct 10, 2022 · 2 comments · Fixed by #15089
Closed
2 tasks

Changes to the deprecation window in 1.8+ #15049

awaelchli opened this issue Oct 10, 2022 · 2 comments · Fixed by #15089
Labels
breaking change Includes a breaking change deprecation Includes a deprecation pl Generic label for PyTorch Lightning package
Milestone

Comments

@awaelchli
Copy link
Contributor

awaelchli commented Oct 10, 2022

🚀 Augmented deprecation window

Motivation

We currently have the following deprecation pattern:

  • Deprecate an API in v1.x and emit a warning.
  • Remove the API in v1.(x+2) together with the warning.
    This is documented in our API Evolution section in the docs.

We have found that is very common that users don't update their projects very often, but when they do they jump more than two minor versions, for example from v1.4 to v1.8. In such cases, they miss deprecation messages entirely and end up with silent, undocumented behavior that is hard to debug.

Pitch

We propose to implement a new pattern:

  • Deprecate API in v1.x with a warning for removal in v1.(x+2). Same as before.
  • Remove API in v1.(x+2) and convert warnings to errors.
  • Remove errors for removed APIs in v2.0.

This is meant to balance development speed with giving good feedback to users coming from an old version of Lightning.
Here is an example PR that will start this new pattern: #14835

Exceptions

There will likely be exceptions where this pattern can't be followed. As a rule of thumb, we say that this should apply to every API or behavioral deprecation, but on a case-by-case basis we will also evaluate feasibility and decide based on that whether an exception can be made.

TODOs

Alternatives

None.

Additional context

Work done in #14841 will partially have to be undone.

cc @lantiga @carmocca @Borda @justusschock

@Borda
Copy link
Member

Borda commented Nov 7, 2022

@awaelchli, just for the record, were the todos done? 🦦

@awaelchli
Copy link
Contributor Author

Yes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change Includes a breaking change deprecation Includes a deprecation pl Generic label for PyTorch Lightning package
Projects
No open projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants