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

General policy for supported Python version #74203

Closed
albanD opened this issue Mar 14, 2022 · 5 comments
Closed

General policy for supported Python version #74203

albanD opened this issue Mar 14, 2022 · 5 comments
Labels
module: python frontend For issues relating to PyTorch's Python frontend oncall: releng In support of CI and Release Engineering triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module

Comments

@albanD
Copy link
Collaborator

albanD commented Mar 14, 2022

Context

Following yet another discussion on which Python version we support (#74087) we would like to open a broader discussion on this.

For historical context on how we dealt with 3.6.X versions, we dropped <3.6.2 early on to be able to use features from it #47314. We then moved to 3.7.0 as minimum version when 3.6 reached EOL #71494.

The naming for versions below will be "major.minor.patch".

Related policies are:

Based on this here are two proposals to move forward:

In both cases we will have pip install torch still works just fine. For older versions of Python you will only get the most recent PyTorch version that is available. The difference between the options below is how recent will the version of PyTorch be.

1) Adopt NEP 29

  • This NEP is very successful for numpy and related libaries (for example jax follows this as well).
  • It simplifies and reduces cost of maintenance/CI. It is more important to support newer versions quickly than keep supporting old versions for newer releases.
  • It allows us to use newer Python features much faster.
  • We will drop support for Python versions much faster than we've been doing up to know (more or less until EOL).
Deprecation dates under this proposal
Dropping Python 3.4 at Sep 15, 2017
Dropping Python 3.5 at Mar 14, 2019
Dropping Python 3.6 at Jun 23, 2020
Dropping Python 3.7 at Dec 26, 2021
Dropping Python 3.8 at Apr 14, 2023
Dropping Python 3.9 at Apr 05, 2024
Dropping Python 3.10 at Apr 04, 2025

2) Use NEP 29 for patch versions and EOL for minor versions

  • We would "reserve the right to drop support" to avoid having to change supported patch all the time. But we have a clear answer if asked if a patch feature can be used.
  • Very similar to what we are doing right now
  • Will change quite often as patch versions are released relatively often
  • Can be confusing that 3.8.0 will not be supported while 3.7.6 still is
  • Support quite old version. For the issue above, we would have to wait until end of April this year to move to 3.7.2
Deprecation dates under this proposal
Dropping Python 3.4 at Mar 17, 2019
Dropping Python 3.5 at Sep 12, 2020
Dropping Python 3.6 at Dec 23, 2021
Dropping Python 3.7.0 at Dec 26, 2021
Dropping Python 3.7.1 at Apr 20, 2022
Dropping Python 3.7.2 at Jun 24, 2022
Dropping Python 3.7.3 at Sep 23, 2022
Dropping Python 3.7.4 at Jan 06, 2023
Dropping Python 3.8.0 at Apr 14, 2023
Dropping Python 3.7.5 at Apr 15, 2023
Dropping Python 3.8.1 at Jun 18, 2023
Dropping Python 3.7.6 at Jun 18, 2023
Dropping Python 3.7 at Jun 27, 2023
Dropping Python 3.8.2 at Aug 25, 2023
Dropping Python 3.8.3 at Nov 12, 2023
Dropping Python 3.8.4 at Jan 12, 2024
Dropping Python 3.8.5 at Jan 19, 2024
Dropping Python 3.8.6 at Mar 25, 2024
Dropping Python 3.9.0 at Apr 05, 2024
Dropping Python 3.9.1 at Jun 07, 2024
Dropping Python 3.8.7 at Jun 21, 2024
Dropping Python 3.9.2 at Aug 20, 2024
Dropping Python 3.8.8 at Aug 20, 2024
Dropping Python 3.8.9 at Oct 01, 2024
Dropping Python 3.9.4 at Oct 03, 2024
Dropping Python 3.8 at Oct 13, 2024
Dropping Python 3.9.5 at Nov 01, 2024
Dropping Python 3.9.6 at Dec 27, 2024
Dropping Python 3.9.7 at Feb 28, 2025
Dropping Python 3.10.0 at Apr 04, 2025
Dropping Python 3.9.8 at May 06, 2025
Dropping Python 3.9.9 at May 16, 2025
Dropping Python 3.10.1 at Jun 06, 2025
Dropping Python 3.9.10 at Jul 15, 2025
Dropping Python 3.10.2 at Jul 15, 2025
Dropping Python 3.9 at Oct 05, 2025
Dropping Python 3.10 at Oct 04, 2026

WDYT ?

@albanD albanD added triage review oncall: releng In support of CI and Release Engineering triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module module: python frontend For issues relating to PyTorch's Python frontend labels Mar 14, 2022
@soumith
Copy link
Member

soumith commented Mar 14, 2022

we should do whatever numpy does

@bottler
Copy link
Contributor

bottler commented Mar 15, 2022

It's convenient if the build of PyTorch on Google Colab is one of the official ones. Historically, Colab has been much faster at taking new PyTorch versions than new Python versions. I'm not sure if that's a good thing, but if PyTorch copied numpy that could force a slowdown. For example, Colab is still on Python 3.7, and it's not clear how long that will stay true. Under NEP 29, Colab wouldn't have a build of PyTorch 1.11 now to upgrade to.

@albanD
Copy link
Collaborator Author

albanD commented Mar 15, 2022

Thanks for pointing this out @bottler
One detail here, Colab uses 3.7.12 (the latest patch for 3.7).

@swolchok
Copy link
Contributor

by the way, the github.com/pytorch/pytorch front page (so the README?) still mentions supported versions of Python 3.6; we should update that, right?

facebook-github-bot pushed a commit that referenced this issue May 13, 2022
Summary:
Closes #74203

Signed-off-by: Eli Uriegas <[email protected]>

Pull Request resolved: #77304
Approved by: https://github.com/b0noI

Test Plan: contbuild & OSS CI, see https://hud.pytorch.org/commit/pytorch/pytorch/e8f53ad1f11301aa0f96d331a1126cf9d718b195

Reviewed By: atalman

Differential Revision: D36353749

fbshipit-source-id: 1d9649aa02ebd3bdea314084c638247265d8d674
@EwoutH
Copy link

EwoutH commented Jun 29, 2022

Now that NEP 29 is adopted by PyTorch and PyTorch 1.12 is released, it seems like a good moment to drop Python 3.7. I opened an issue about this here: #80513

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module: python frontend For issues relating to PyTorch's Python frontend oncall: releng In support of CI and Release Engineering triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants