提交 51ea1a0b authored 作者: Brendan Murphy's avatar Brendan Murphy 提交者: Ricardo Vieira

Added numpy 1.26.* to CI

Remaining tests now run on latest numpy, except for Numba jobs, which need numpy 2.1.0
上级 b7169984
...@@ -65,7 +65,7 @@ jobs: ...@@ -65,7 +65,7 @@ jobs:
- uses: pre-commit/action@v3.0.1 - uses: pre-commit/action@v3.0.1
test: test:
name: "${{ matrix.os }} test py${{ matrix.python-version }} : fast-compile ${{ matrix.fast-compile }} : float32 ${{ matrix.float32 }} : ${{ matrix.part }}" name: "${{ matrix.os }} test py${{ matrix.python-version }} numpy${{ matrix.numpy-version }} : fast-compile ${{ matrix.fast-compile }} : float32 ${{ matrix.float32 }} : ${{ matrix.part }}"
needs: needs:
- changes - changes
- style - style
...@@ -76,6 +76,7 @@ jobs: ...@@ -76,6 +76,7 @@ jobs:
matrix: matrix:
os: ["ubuntu-latest"] os: ["ubuntu-latest"]
python-version: ["3.10", "3.12"] python-version: ["3.10", "3.12"]
numpy-version: ["~=1.26.0", ">=2.0"]
fast-compile: [0, 1] fast-compile: [0, 1]
float32: [0, 1] float32: [0, 1]
install-numba: [0] install-numba: [0]
...@@ -105,45 +106,68 @@ jobs: ...@@ -105,45 +106,68 @@ jobs:
float32: 1 float32: 1
- part: "--doctest-modules pytensor --ignore=pytensor/misc/check_duplicate_key.py --ignore=pytensor/link" - part: "--doctest-modules pytensor --ignore=pytensor/misc/check_duplicate_key.py --ignore=pytensor/link"
fast-compile: 1 fast-compile: 1
- numpy-version: "~=1.26.0"
fast-compile: 1
- numpy-version: "~=1.26.0"
float32: 1
- numpy-version: "~=1.26.0"
python-version: "3.12"
- numpy-version: "~=1.26.0"
part: "--doctest-modules pytensor --ignore=pytensor/misc/check_duplicate_key.py --ignore=pytensor/link"
include: include:
- install-numba: 1 - install-numba: 1
os: "ubuntu-latest" os: "ubuntu-latest"
python-version: "3.10" python-version: "3.10"
numpy-version: "~=2.1.0"
fast-compile: 0 fast-compile: 0
float32: 0 float32: 0
part: "tests/link/numba" part: "tests/link/numba"
- install-numba: 1 - install-numba: 1
os: "ubuntu-latest" os: "ubuntu-latest"
python-version: "3.12" python-version: "3.12"
numpy-version: "~=2.1.0"
fast-compile: 0 fast-compile: 0
float32: 0 float32: 0
part: "tests/link/numba" part: "tests/link/numba"
- install-jax: 1 - install-jax: 1
os: "ubuntu-latest" os: "ubuntu-latest"
python-version: "3.10" python-version: "3.10"
numpy-version: ">=2.0"
fast-compile: 0 fast-compile: 0
float32: 0 float32: 0
part: "tests/link/jax" part: "tests/link/jax"
- install-jax: 1 - install-jax: 1
os: "ubuntu-latest" os: "ubuntu-latest"
python-version: "3.12" python-version: "3.12"
numpy-version: ">=2.0"
fast-compile: 0 fast-compile: 0
float32: 0 float32: 0
part: "tests/link/jax" part: "tests/link/jax"
- install-torch: 1 - install-torch: 1
os: "ubuntu-latest" os: "ubuntu-latest"
python-version: "3.10" python-version: "3.10"
numpy-version: ">=2.0"
fast-compile: 0 fast-compile: 0
float32: 0 float32: 0
part: "tests/link/pytorch" part: "tests/link/pytorch"
- os: macos-15 - os: macos-15
python-version: "3.12" python-version: "3.12"
numpy-version: ">=2.0"
fast-compile: 0 fast-compile: 0
float32: 0 float32: 0
install-numba: 0 install-numba: 0
install-jax: 0 install-jax: 0
install-torch: 0 install-torch: 0
part: "tests/tensor/test_blas.py tests/tensor/test_elemwise.py tests/tensor/test_math_scipy.py" part: "tests/tensor/test_blas.py tests/tensor/test_elemwise.py tests/tensor/test_math_scipy.py"
- os: "ubuntu-latest"
python-version: "3.10"
numpy-version: "~=1.26.0"
fast-compile: 0
float32: 0
install-numba: 0
install-jax: 0
install-torch: 0
part: "tests/tensor/test_math.py"
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
...@@ -174,9 +198,9 @@ jobs: ...@@ -174,9 +198,9 @@ jobs:
run: | run: |
if [[ $OS == "macos-15" ]]; then if [[ $OS == "macos-15" ]]; then
micromamba install --yes -q "python~=${PYTHON_VERSION}=*_cpython" numpy scipy pip graphviz cython pytest coverage pytest-cov pytest-benchmark pytest-mock libblas=*=*accelerate; 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;
else else
micromamba install --yes -q "python~=${PYTHON_VERSION}=*_cpython" mkl numpy scipy pip mkl-service graphviz cython pytest coverage pytest-cov pytest-benchmark pytest-mock; 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;
fi fi
if [[ $INSTALL_NUMBA == "1" ]]; then micromamba install --yes -q -c conda-forge "python~=${PYTHON_VERSION}=*_cpython" "numba>=0.57"; fi if [[ $INSTALL_NUMBA == "1" ]]; then micromamba install --yes -q -c conda-forge "python~=${PYTHON_VERSION}=*_cpython" "numba>=0.57"; fi
if [[ $INSTALL_JAX == "1" ]]; then micromamba install --yes -q -c conda-forge "python~=${PYTHON_VERSION}=*_cpython" jax jaxlib numpyro && pip install tensorflow-probability; fi 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: ...@@ -193,6 +217,7 @@ jobs:
fi fi
env: env:
PYTHON_VERSION: ${{ matrix.python-version }} PYTHON_VERSION: ${{ matrix.python-version }}
NUMPY_VERSION: ${{ matrix.numpy-version }}
INSTALL_NUMBA: ${{ matrix.install-numba }} INSTALL_NUMBA: ${{ matrix.install-numba }}
INSTALL_JAX: ${{ matrix.install-jax }} INSTALL_JAX: ${{ matrix.install-jax }}
INSTALL_TORCH: ${{ matrix.install-torch}} INSTALL_TORCH: ${{ matrix.install-torch}}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论