Skip to content

Commit 51ea1a0

Browse files
brendan-m-murphyricardoV94
authored andcommitted
Added numpy 1.26.* to CI
Remaining tests now run on latest numpy, except for Numba jobs, which need numpy 2.1.0
1 parent b716998 commit 51ea1a0

File tree

1 file changed

+28
-3
lines changed

1 file changed

+28
-3
lines changed

Diff for: .github/workflows/test.yml

+28-3
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ jobs:
6565
- uses: pre-commit/[email protected]
6666

6767
test:
68-
name: "${{ matrix.os }} test py${{ matrix.python-version }} : fast-compile ${{ matrix.fast-compile }} : float32 ${{ matrix.float32 }} : ${{ matrix.part }}"
68+
name: "${{ matrix.os }} test py${{ matrix.python-version }} numpy${{ matrix.numpy-version }} : fast-compile ${{ matrix.fast-compile }} : float32 ${{ matrix.float32 }} : ${{ matrix.part }}"
6969
needs:
7070
- changes
7171
- style
@@ -76,6 +76,7 @@ jobs:
7676
matrix:
7777
os: ["ubuntu-latest"]
7878
python-version: ["3.10", "3.12"]
79+
numpy-version: ["~=1.26.0", ">=2.0"]
7980
fast-compile: [0, 1]
8081
float32: [0, 1]
8182
install-numba: [0]
@@ -105,45 +106,68 @@ jobs:
105106
float32: 1
106107
- part: "--doctest-modules pytensor --ignore=pytensor/misc/check_duplicate_key.py --ignore=pytensor/link"
107108
fast-compile: 1
109+
- numpy-version: "~=1.26.0"
110+
fast-compile: 1
111+
- numpy-version: "~=1.26.0"
112+
float32: 1
113+
- numpy-version: "~=1.26.0"
114+
python-version: "3.12"
115+
- numpy-version: "~=1.26.0"
116+
part: "--doctest-modules pytensor --ignore=pytensor/misc/check_duplicate_key.py --ignore=pytensor/link"
108117
include:
109118
- install-numba: 1
110119
os: "ubuntu-latest"
111120
python-version: "3.10"
121+
numpy-version: "~=2.1.0"
112122
fast-compile: 0
113123
float32: 0
114124
part: "tests/link/numba"
115125
- install-numba: 1
116126
os: "ubuntu-latest"
117127
python-version: "3.12"
128+
numpy-version: "~=2.1.0"
118129
fast-compile: 0
119130
float32: 0
120131
part: "tests/link/numba"
121132
- install-jax: 1
122133
os: "ubuntu-latest"
123134
python-version: "3.10"
135+
numpy-version: ">=2.0"
124136
fast-compile: 0
125137
float32: 0
126138
part: "tests/link/jax"
127139
- install-jax: 1
128140
os: "ubuntu-latest"
129141
python-version: "3.12"
142+
numpy-version: ">=2.0"
130143
fast-compile: 0
131144
float32: 0
132145
part: "tests/link/jax"
133146
- install-torch: 1
134147
os: "ubuntu-latest"
135148
python-version: "3.10"
149+
numpy-version: ">=2.0"
136150
fast-compile: 0
137151
float32: 0
138152
part: "tests/link/pytorch"
139153
- os: macos-15
140154
python-version: "3.12"
155+
numpy-version: ">=2.0"
141156
fast-compile: 0
142157
float32: 0
143158
install-numba: 0
144159
install-jax: 0
145160
install-torch: 0
146161
part: "tests/tensor/test_blas.py tests/tensor/test_elemwise.py tests/tensor/test_math_scipy.py"
162+
- os: "ubuntu-latest"
163+
python-version: "3.10"
164+
numpy-version: "~=1.26.0"
165+
fast-compile: 0
166+
float32: 0
167+
install-numba: 0
168+
install-jax: 0
169+
install-torch: 0
170+
part: "tests/tensor/test_math.py"
147171

148172
steps:
149173
- uses: actions/checkout@v4
@@ -174,9 +198,9 @@ jobs:
174198
run: |
175199
176200
if [[ $OS == "macos-15" ]]; then
177-
micromamba install --yes -q "python~=${PYTHON_VERSION}=*_cpython" numpy scipy pip graphviz cython pytest coverage pytest-cov pytest-benchmark pytest-mock libblas=*=*accelerate;
201+
micromamba install --yes -q "python~=${PYTHON_VERSION}=*_cpython" "numpy${NUMPY_VERSION}" scipy pip graphviz cython pytest coverage pytest-cov pytest-benchmark pytest-mock libblas=*=*accelerate;
178202
else
179-
micromamba install --yes -q "python~=${PYTHON_VERSION}=*_cpython" mkl numpy scipy pip mkl-service graphviz cython pytest coverage pytest-cov pytest-benchmark pytest-mock;
203+
micromamba install --yes -q "python~=${PYTHON_VERSION}=*_cpython" mkl "numpy${NUMPY_VERSION}" scipy pip mkl-service graphviz cython pytest coverage pytest-cov pytest-benchmark pytest-mock;
180204
fi
181205
if [[ $INSTALL_NUMBA == "1" ]]; then micromamba install --yes -q -c conda-forge "python~=${PYTHON_VERSION}=*_cpython" "numba>=0.57"; fi
182206
if [[ $INSTALL_JAX == "1" ]]; then micromamba install --yes -q -c conda-forge "python~=${PYTHON_VERSION}=*_cpython" jax jaxlib numpyro && pip install tensorflow-probability; fi
@@ -193,6 +217,7 @@ jobs:
193217
fi
194218
env:
195219
PYTHON_VERSION: ${{ matrix.python-version }}
220+
NUMPY_VERSION: ${{ matrix.numpy-version }}
196221
INSTALL_NUMBA: ${{ matrix.install-numba }}
197222
INSTALL_JAX: ${{ matrix.install-jax }}
198223
INSTALL_TORCH: ${{ matrix.install-torch}}

0 commit comments

Comments
 (0)