Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 6a1ef07

Browse files
authoredOct 2, 2024··
Drop python 3.8 in the CI (#3288)
* Drop python 3.8 in the CI * Try horovod CPU CI on python 3.10 * Fix 3.10 -> "3.10" * Update hvd-tests.yml * Build horovod from source * debug with tmate * debug 2 * Fixed horovod build * Fix mypy on neptune import in neptune logger
1 parent 8e53b76 commit 6a1ef07

File tree

7 files changed

+24
-17
lines changed

7 files changed

+24
-17
lines changed
 

‎.github/workflows/code-style.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
uses: actions/checkout@v4
2424
- uses: actions/setup-python@v4
2525
with:
26-
python-version: "3.8"
26+
python-version: "3.11"
2727
- run: |
2828
bash ./tests/run_code_style.sh install
2929
bash ./tests/run_code_style.sh fmt

‎.github/workflows/hvd-tests.yml

+15-2
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
timeout-minutes: 60
2929
strategy:
3030
matrix:
31-
python-version: [3.8]
31+
python-version: ["3.11"]
3232
pytorch-channel: [pytorch]
3333

3434
steps:
@@ -64,7 +64,20 @@ jobs:
6464
#install other dependencies
6565
pip install torch torchvision --index-url https://download.pytorch.org/whl/cpu
6666
pip install -r requirements-dev.txt
67-
pip install horovod
67+
68+
# Install Horovod from source and apply a patch to build with recent pytorch
69+
# We can't use pip install <whatever> as build-env can't find pytorch and
70+
# `--no-build-isolation` does not work with horovod setup.py
71+
git clone --recursive https://github.com/horovod/horovod.git /tmp/horovod
72+
cd /tmp/horovod
73+
sed -i "s/CMAKE_CXX_STANDARD 14/CMAKE_CXX_STANDARD 17/g" CMakeLists.txt
74+
sed -i "s/CMAKE_CXX_STANDARD 14/CMAKE_CXX_STANDARD 17/g" horovod/torch/CMakeLists.txt
75+
HOROVOD_WITH_PYTORCH=1 python setup.py install
76+
cd -
77+
# test the installation:
78+
python -c "import horovod.torch as hvd; hvd.mpi_ops.Sum"
79+
80+
# Install ignite
6881
python setup.py install
6982
7083
# Download MNIST: https://github.com/pytorch/ignite/issues/1737

‎.github/workflows/mps-tests.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
mps-tests:
3535
strategy:
3636
matrix:
37-
python-version: [3.8]
37+
python-version: [3.11]
3838
pytorch-channel: ["pytorch"]
3939
skip-distrib-tests: [1]
4040
fail-fast: false

‎.github/workflows/pytorch-version-tests.yml

+2
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ jobs:
1515
max-parallel: 5
1616
fail-fast: false
1717
matrix:
18+
# Here we keep python 3.8 tests until the end of the 2024 and
19+
# will drop python version and related pytorch versions
1820
python-version: [3.8, 3.9, "3.10"]
1921
pytorch-version:
2022
[2.3.1, 2.2.2, 2.1.2, 2.0.1, 1.13.1, 1.12.1, 1.10.0, 1.8.1, 1.5.1]

‎.github/workflows/unit-tests.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -40,18 +40,18 @@ jobs:
4040
fail-fast: false
4141
matrix:
4242
os: [ubuntu-latest]
43-
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
43+
python-version: ["3.9", "3.10", "3.11", "3.12"]
4444
pytorch-channel: [pytorch, pytorch-nightly]
4545
include:
4646
# includes a single build on windows
4747
- os: windows-latest
4848
pytorch-channel: pytorch
49-
python-version: 3.9
49+
python-version: 3.11
5050
skip-distrib-tests: 1
5151
# includes a single build on macosx
5252
- os: macos-latest
5353
pytorch-channel: pytorch
54-
python-version: 3.9
54+
python-version: 3.11
5555
skip-distrib-tests: 1
5656

5757
steps:

‎CONTRIBUTING.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ into the following categories:
6161
- Create an isolated conda environment for pytorch-ignite:
6262

6363
```bash
64-
conda create -n pytorch-ignite-dev python=3.8
64+
conda create -n pytorch-ignite-dev python=3.11
6565
```
6666

6767
- Activate the newly created environment:

‎ignite/handlers/neptune_logger.py

+1-9
Original file line numberDiff line numberDiff line change
@@ -166,15 +166,7 @@ def __setitem__(self, key: str, val: Any) -> Any:
166166

167167
def __init__(self, api_token: Optional[str] = None, project: Optional[str] = None, **kwargs: Any) -> None:
168168
try:
169-
try:
170-
# neptune-client<1.0.0 package structure
171-
with warnings.catch_warnings():
172-
# ignore the deprecation warnings
173-
warnings.simplefilter("ignore")
174-
import neptune.new as neptune
175-
except ImportError:
176-
# neptune>=1.0.0 package structure
177-
import neptune
169+
import neptune
178170
except ImportError:
179171
raise ModuleNotFoundError(
180172
"This contrib module requires the Neptune client library to be installed. "

0 commit comments

Comments
 (0)
Please sign in to comment.