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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: Enable testing with Python 3.10 #1132

Merged
merged 10 commits into from Jul 11, 2022
Merged
1 change: 1 addition & 0 deletions .github/assistant.py
Expand Up @@ -29,6 +29,7 @@
LUT_PYTHON_TORCH = {
"3.8": "1.4",
"3.9": "1.7.1",
"3.10": "1.11",
}
_path = lambda *ds: os.path.join(_PATH_ROOT, *ds)
REQUIREMENTS_FILES = tuple(glob.glob(_path("requirements", "*.txt")) + [_path("requirements.txt")])
Expand Down
12 changes: 5 additions & 7 deletions .github/workflows/ci_integrate.yml
Expand Up @@ -25,11 +25,13 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-20.04, macOS-10.15, windows-2019]
python-version: [3.7, 3.9]
python-version: ['3.7', '3.10']
requires: ['oldest', 'latest']
exclude:
- {python-version: 3.7, requires: 'latest'}
- {python-version: 3.9, requires: 'oldest'}
- {python-version: '3.7', requires: 'latest'}
- {python-version: '3.9', requires: 'oldest'}
- {python-version: '3.10', requires: 'oldest'}
- {python-version: '3.10', os: 'windows-2019'} # todo
Borda marked this conversation as resolved.
Show resolved Hide resolved
env:
PYTEST_ARTEFACT: test-results-${{ matrix.os }}-py${{ matrix.python-version }}-${{ matrix.requires }}.xml
PYTORCH_URL: https://download.pytorch.org/whl/cpu/torch_stable.html
Expand All @@ -56,10 +58,6 @@ jobs:
if: inputs.requires == 'oldest'
run: python .github/assistant.py set-oldest-versions --req_files=requirements/integrate.txt

- name: Freeze Numpy (hotfix)
if: matrix.requires == 'latest'
run: pip install "numpy==1.20.0" # temp fix for cypesq

- name: Freeze PIL (hotfix)
# import of PILLOW_VERSION which they recently removed in v9.0 in favor of __version__
run: pip install "Pillow<9.0" # It messes with torchvision
Expand Down
10 changes: 6 additions & 4 deletions .github/workflows/ci_test-conda.yml
Expand Up @@ -29,9 +29,12 @@ jobs:
python-version: ["3.8"]
pytorch-version: ["1.4", "1.5", "1.6", "1.7", "1.8", "1.9", "1.10", "1.11"]
include:
- {python-version: 3.7, pytorch-version: '1.3'}
- {python-version: 3.9, pytorch-version: '1.12'}
- {python-version: 3.9, pytorch-version: '1.13'}
- {python-version: '3.7', pytorch-version: '1.3'}
- {python-version: '3.9', pytorch-version: '1.12'}
- {python-version: '3.9', pytorch-version: '1.13'}
- {python-version: '3.10', pytorch-version: '1.11'}
- {python-version: '3.10', pytorch-version: '1.12'}
- {python-version: '3.10', pytorch-version: '1.13'}
env:
PYTEST_ARTEFACT: test-conda-py${{ matrix.python-version }}-pt${{ matrix.pytorch-version }}.xml

Expand Down Expand Up @@ -75,7 +78,6 @@ jobs:
pip install --requirement requirements/test.txt --quiet
python ./.github/assistant.py prune-packages requirements/image.txt torchvision
python ./.github/assistant.py prune-packages requirements/detection.txt torchvision
pip install -q "numpy==1.20.0" # try to fix cocotools for PT 1.4 & 1.9
# import of PILLOW_VERSION which they recently removed in v9.0 in favor of __version__
pip install -q "Pillow<9.0" # It messes with torchvision
pip install -e . -r requirements/devel.txt -f https://download.pytorch.org/whl/cpu/torch_stable.html
Expand Down
12 changes: 5 additions & 7 deletions .github/workflows/ci_test-full.yml
Expand Up @@ -28,11 +28,13 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-20.04, macOS-10.15, windows-2019]
python-version: [3.7, 3.8, 3.9]
python-version: ['3.7', '3.8', '3.9', '3.10']
requires: ['oldest', 'latest']
exclude:
- {python-version: 3.7, requires: 'latest'}
- {python-version: 3.9, requires: 'oldest'}
- {python-version: '3.7', requires: 'latest'}
- {python-version: '3.9', requires: 'oldest'}
- {python-version: '3.10', requires: 'oldest'}
- {python-version: '3.10', os: 'windows-2019'} # todo
Borda marked this conversation as resolved.
Show resolved Hide resolved
env:
PYTEST_ARTEFACT: test-results-${{ matrix.os }}-py${{ matrix.python-version }}-${{ matrix.requires }}.xml
PYTORCH_URL: https://download.pytorch.org/whl/cpu/torch_stable.html
Expand Down Expand Up @@ -81,10 +83,6 @@ jobs:
# NOTE: run coverage on tests does not propagate failure status for Win, https://github.com/nedbat/coveragepy/issues/1003
run: python -m pytest torchmetrics

- name: Freeze Numpy (hotfix)
if: matrix.requires == 'latest'
run: pip install "numpy==1.20.0" # temp fix for cypesq

- name: Freeze PIL (hotfix)
# import of PILLOW_VERSION which they recently removed in v9.0 in favor of __version__
run: pip install "Pillow<9.0" # It messes with torchvision
Expand Down
1 change: 1 addition & 0 deletions setup.py
Expand Up @@ -159,5 +159,6 @@ def _prepare_extras(skip_files: Tuple[str] = ("devel.txt",)):
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
],
)