Skip to content

Commit

Permalink
Update minimum Python version for Captum to 3.9
Browse files Browse the repository at this point in the history
Summary:
Python 3.8 has reached EOL in Oct 2024, so we can upgrade minimum python required for Captum to 3.9.

We are seeing test failures due to dependencies when running with Python 3.8, so upgrading minimum version to resolve these.

Differential Revision: D67545940
  • Loading branch information
Vivek Miglani authored and facebook-github-bot committed Dec 20, 2024
1 parent 2b9f4ae commit 600dcb3
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .conda/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ build:

requirements:
host:
- python>=3.8
- python>=3.9
run:
- numpy<2.0
- pytorch>=1.10
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-conda-cpu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
tests:
strategy:
matrix:
python_version: ["3.8", "3.9", "3.10", "3.11"]
python_version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
fail-fast: false
uses: pytorch/test-infra/.github/workflows/linux_job.yml@main
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-pip-cpu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
matrix:
pytorch_args: ["-v 1.10", "-v 1.11", "-v 1.12", "-v 1.13", "-v 2.0.0", "-v 2.1.0", "-v 2.2.0", "-v 2.3.0"]
transformers_args: ["-t 4.38.0", "-t 4.39.0", "-t 4.41.0", "-t 4.43.0", "-t 4.45.2"]
docker_img: ["cimg/python:3.8", "cimg/python:3.9", "cimg/python:3.10", "cimg/python:3.11"]
docker_img: ["cimg/python:3.9", "cimg/python:3.10", "cimg/python:3.11", "cimg/python:3.12", "cimg/python:3.13"]
exclude:
- pytorch_args: "-v 1.10"
docker_img: "cimg/python:3.10"
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ Then run this script from the repository root:
```
Note that we expect mypy to have version 0.760 or higher, and when type checking, use PyTorch 1.4 or
higher due to fixes to PyTorch type hints available in 1.4. We also use the Literal feature which is
available only in Python 3.8 or above. If type-checking using a previous version of Python, you will
available only in Python 3.9 or above. If type-checking using a previous version of Python, you will
need to install the typing-extension package which can be done with pip using `pip install typing-extensions`.

#### Unit Tests
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ Captum can also be used by application engineers who are using trained models in
## Installation

**Installation Requirements**
- Python >= 3.8
- Python >= 3.9
- PyTorch >= 1.10


Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
from setuptools import find_packages, setup

REQUIRED_MAJOR = 3
REQUIRED_MINOR = 8
REQUIRED_MINOR = 9

# Check for python version
if sys.version_info < (REQUIRED_MAJOR, REQUIRED_MINOR):
Expand Down Expand Up @@ -148,7 +148,7 @@ def get_package_files(root, subdirs):
],
long_description=long_description,
long_description_content_type="text/markdown",
python_requires=">=3.8",
python_requires=">=3.9",
install_requires=[
"matplotlib",
"numpy<2.0",
Expand Down

0 comments on commit 600dcb3

Please sign in to comment.