Skip to content

Commit 94bb947

Browse files
Merge branch 'main' into DNDarray_sanity_checks
2 parents e5eb447 + d172bdc commit 94bb947

File tree

6 files changed

+112
-41
lines changed

6 files changed

+112
-41
lines changed

.github/workflows/ci.yaml

Lines changed: 19 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,55 +1,33 @@
11
name: ci
22

33
on:
4-
pull_request_review:
5-
types: [submitted]
4+
push:
5+
branches-ignore:
6+
- main
7+
- dependabot/**
68

79
jobs:
810
approved:
9-
if: github.event.review.state == 'approved'
11+
if: github.event.pull_request.draft == false
1012
runs-on: ubuntu-latest
13+
timeout-minutes: 120
1114
strategy:
1215
fail-fast: false
1316
matrix:
1417
py-version:
15-
- '3.10'
16-
- '3.11'
17-
- '3.12'
18-
- '3.13'
19-
- '3.14'
18+
- '3.10' # Oldest supported
19+
- '3.14' # Latest stable
2020
mpi: [ 'openmpi' ]
2121
install-options: [ '.', '.[hdf5,netcdf,pandas,zarr]' ]
2222
pytorch-version:
23-
- 'torch==2.3.1 torchvision==0.18.1 torchaudio==2.3.1'
24-
- 'torch==2.4.1 torchvision==0.19.1 torchaudio==2.4.1'
25-
- 'torch==2.5.1 torchvision==0.20.1 torchaudio==2.5.1'
26-
- 'torch==2.6.0 torchvision==0.21.0 torchaudio==2.6.0'
27-
- 'torch==2.7.1 torchvision==0.22.1 torchaudio==2.7.1'
28-
- 'torch==2.8.0 torchvision==0.23.0 torchaudio==2.8.0'
29-
- 'torch==2.9.1 torchvision==0.24.1 torchaudio==2.9.1'
30-
- 'torch==2.10.0 torchvision==0.25.0 torchaudio==2.10.0'
23+
- 'torch==2.3.1 torchvision==0.18.1 torchaudio==2.3.1' # Oldest supported
24+
- 'torch==2.9.1 torchvision==0.24.1 torchaudio==2.9.1' # JSC Stage 2026
25+
- 'torch==2.10.0 torchvision==0.25.0 torchaudio==2.10.0' # Latest stable
3126
exclude:
32-
- py-version: '3.14'
33-
pytorch-version: 'torch==2.3.1 torchvision==0.18.1 torchaudio==2.3.1'
34-
- py-version: '3.14'
35-
pytorch-version: 'torch==2.4.1 torchvision==0.19.1 torchaudio==2.4.1'
36-
- py-version: '3.14'
37-
pytorch-version: 'torch==2.5.1 torchvision==0.20.1 torchaudio==2.5.1'
38-
- py-version: '3.14'
39-
pytorch-version: 'torch==2.6.0 torchvision==0.21.0 torchaudio==2.6.0'
40-
- py-version: '3.14'
41-
pytorch-version: 'torch==2.7.1 torchvision==0.22.1 torchaudio==2.7.1'
42-
- py-version: '3.14'
43-
pytorch-version: 'torch==2.8.0 torchvision==0.23.0 torchaudio==2.8.0'
44-
- py-version: '3.13'
45-
pytorch-version: 'torch==2.3.1 torchvision==0.18.1 torchaudio==2.3.1'
46-
- py-version: '3.13'
47-
pytorch-version: 'torch==2.4.1 torchvision==0.19.1 torchaudio==2.4.1'
48-
- py-version: '3.13'
49-
pytorch-version: 'torch==2.5.1 torchvision==0.20.1 torchaudio==2.5.1'
5027
- py-version: '3.10'
5128
install-options: '.[hdf5,netcdf,pandas,zarr]'
52-
29+
- py-version: '3.14'
30+
pytorch-version: 'torch==2.3.1 torchvision==0.18.1 torchaudio==2.3.1'
5331

5432
name: Python ${{ matrix.py-version }} with ${{ matrix.pytorch-version }}; options ${{ matrix.install-options }}
5533
steps:
@@ -60,18 +38,22 @@ jobs:
6038

6139
- name: Checkout
6240
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
41+
6342
- name: Setup MPI
6443
uses: mpi4py/setup-mpi@3969f247e8fceef153418744f9d9ee6fdaeda29f # v1.2.0
6544
with:
6645
mpi: ${{ matrix.mpi }}
46+
6747
- name: Use Python ${{ matrix.py-version }}
6848
uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0
6949
with:
7050
python-version: ${{ matrix.py-version }}
7151
architecture: x64
52+
7253
- name: Test
7354
run: |
7455
pip install pytest
7556
pip install ${{ matrix.pytorch-version }} ${{ matrix.install-options }} --extra-index-url https://download.pytorch.org/whl/cpu
76-
mpirun -n 3 pytest heat/
77-
mpirun -n 4 pytest heat/
57+
# use pytest -vv -x for debugging
58+
pytest heat/
59+
mpirun -n 4 pytest -vv heat/

.github/workflows/ci_full.yaml

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
name: ci_full
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- stable
8+
paths:
9+
- 'heat/**'
10+
- 'pyproject.toml'
11+
- '.github/workflows/ci_full.yaml'
12+
13+
jobs:
14+
full_matrix_test:
15+
runs-on: ubuntu-latest
16+
timeout-minutes: 120
17+
strategy:
18+
fail-fast: false
19+
matrix:
20+
py-version:
21+
- '3.10'
22+
- '3.11'
23+
- '3.12'
24+
- '3.13'
25+
- '3.14'
26+
mpi: [ 'openmpi' ]
27+
install-options: [ '.', '.[hdf5,netcdf,pandas,zarr]' ]
28+
pytorch-version:
29+
- 'torch==2.3.1 torchvision==0.18.1 torchaudio==2.3.1'
30+
- 'torch==2.4.1 torchvision==0.19.1 torchaudio==2.4.1'
31+
- 'torch==2.5.1 torchvision==0.20.1 torchaudio==2.5.1'
32+
- 'torch==2.6.0 torchvision==0.21.0 torchaudio==2.6.0'
33+
- 'torch==2.7.1 torchvision==0.22.1 torchaudio==2.7.1'
34+
- 'torch==2.8.0 torchvision==0.23.0 torchaudio==2.8.0'
35+
- 'torch==2.9.1 torchvision==0.24.1 torchaudio==2.9.1'
36+
- 'torch==2.10.0 torchvision==0.25.0 torchaudio==2.10.0'
37+
exclude:
38+
- py-version: '3.14'
39+
pytorch-version: 'torch==2.3.1 torchvision==0.18.1 torchaudio==2.3.1'
40+
- py-version: '3.14'
41+
pytorch-version: 'torch==2.4.1 torchvision==0.19.1 torchaudio==2.4.1'
42+
- py-version: '3.14'
43+
pytorch-version: 'torch==2.5.1 torchvision==0.20.1 torchaudio==2.5.1'
44+
- py-version: '3.14'
45+
pytorch-version: 'torch==2.6.0 torchvision==0.21.0 torchaudio==2.6.0'
46+
- py-version: '3.14'
47+
pytorch-version: 'torch==2.7.1 torchvision==0.22.1 torchaudio==2.7.1'
48+
- py-version: '3.14'
49+
pytorch-version: 'torch==2.8.0 torchvision==0.23.0 torchaudio==2.8.0'
50+
- py-version: '3.13'
51+
pytorch-version: 'torch==2.3.1 torchvision==0.18.1 torchaudio==2.3.1'
52+
- py-version: '3.13'
53+
pytorch-version: 'torch==2.4.1 torchvision==0.19.1 torchaudio==2.4.1'
54+
- py-version: '3.13'
55+
pytorch-version: 'torch==2.5.1 torchvision==0.20.1 torchaudio==2.5.1'
56+
- py-version: '3.10'
57+
install-options: '.[hdf5,netcdf,pandas,zarr]'
58+
59+
name: Python ${{ matrix.py-version }} with ${{ matrix.pytorch-version }}; options ${{ matrix.install-options }}
60+
steps:
61+
- name: Harden Runner
62+
uses: step-security/harden-runner@5ef0c079ce82195b2a36a210272d6b661572d83e # v2.14.2
63+
with:
64+
egress-policy: audit
65+
66+
- name: Checkout
67+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
68+
69+
- name: Setup MPI
70+
uses: mpi4py/setup-mpi@3969f247e8fceef153418744f9d9ee6fdaeda29f # v1.2.0
71+
with:
72+
mpi: ${{ matrix.mpi }}
73+
74+
- name: Use Python ${{ matrix.py-version }}
75+
uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0
76+
with:
77+
python-version: ${{ matrix.py-version }}
78+
architecture: x64
79+
80+
- name: Test
81+
run: |
82+
pip install pytest
83+
pip install ${{ matrix.pytorch-version }} ${{ matrix.install-options }} --extra-index-url https://download.pytorch.org/whl/cpu
84+
mpirun -n 3 pytest heat/
85+
mpirun -n 4 pytest heat/

.github/workflows/docker.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ jobs:
4949
password: ${{ secrets.GITHUB_TOKEN }}
5050
-
5151
name: Build
52-
uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6.18.0
52+
uses: docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8 # v6.19.2
5353
with:
5454
file: docker/Dockerfile.release
5555
build-args: |
@@ -65,7 +65,7 @@ jobs:
6565
docker run -v `pwd`:`pwd` -w `pwd` --rm test_${{ inputs.name }} pytest
6666
-
6767
name: Build and push
68-
uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6.18.0
68+
uses: docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8 # v6.19.2
6969
with:
7070
file: docker/Dockerfile.release
7171
build-args: |

.readthedocs.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ build:
3232
# If grep failed to find a match (exit code 1), then exit with 18
3333
if [ $? -eq 1 ]; then
3434
echo "No relevant changes found. Skipping build."
35-
exit 18
35+
exit 0
3636
fi
3737
fi
3838

heat/core/tests/test_io.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -990,6 +990,8 @@ def test_load_zarr_group(self):
990990

991991
import zarr
992992

993+
ht.MPI_WORLD.Barrier()
994+
993995
# Write out a nested Zarr store
994996
original_data = np.arange(np.prod(self.ZARR_SHAPE)).reshape(self.ZARR_SHAPE)
995997
nested_group_name = "MAIN_0"
@@ -1027,7 +1029,6 @@ def test_load_zarr_group(self):
10271029
self.assertTrue(np.array_equal(ht_tensor_kw.numpy(), original_data))
10281030

10291031
ht.MPI_WORLD.Barrier()
1030-
10311032
# test loading with wildcard
10321033
num_chunks = self.comm.size * 2 + 1
10331034
if self.comm.size > 3:
@@ -1118,6 +1119,8 @@ def test_load_zarr_group(self):
11181119
with self.assertRaises(FileNotFoundError):
11191120
test = ht.load(self.ZARR_OUT_PATH, variable="NONEXSISTENT_CHUNK_*_SPLIT0/DATA", split=0)
11201121

1122+
ht.MPI_WORLD.Barrier()
1123+
11211124
def test_load_zarr_slice(self):
11221125
if not ht.io.supports_zarr():
11231126
self.skipTest("Requires zarr")

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ dependencies = [
5858
hdf5 = ["h5py>=2.8.0"]
5959
netcdf = ["netCDF4>=1.5.6"]
6060
zarr = ["zarr"]
61+
pandas = ["pandas"]
6162

6263
## Examples and tutorial
6364
examples = [

0 commit comments

Comments
 (0)