diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 355ae7e834..66ac8a1ff3 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -84,14 +84,12 @@ jobs: install-torch: [0] install-xarray: [0] part: - - "tests --ignore=tests/tensor --ignore=tests/scan --ignore=tests/sparse --ignore=tests/xtensor" + - "tests --ignore=tests/tensor --ignore=tests/scan --ignore=tests/xtensor" - "tests/scan" - - "tests/sparse" - - "tests/tensor --ignore=tests/tensor/conv --ignore=tests/tensor/rewriting --ignore=tests/tensor/test_math.py --ignore=tests/tensor/test_basic.py --ignore=tests/tensor/test_inplace.py --ignore=tests/tensor/test_blas.py --ignore=tests/tensor/test_elemwise.py --ignore=tests/tensor/test_math_scipy.py" - - "tests/tensor/conv" + - "tests/tensor --ignore=tests/tensor/rewriting --ignore=tests/tensor/test_math.py --ignore=tests/tensor/test_basic.py --ignore=tests/tensor/test_inplace.py --ignore=tests/tensor/conv --ignore=tests/tensor/test_blas.py --ignore=tests/tensor/test_elemwise.py --ignore=tests/tensor/test_math_scipy.py" - "tests/tensor/rewriting" - "tests/tensor/test_math.py" - - "tests/tensor/test_basic.py tests/tensor/test_inplace.py" + - "tests/tensor/test_basic.py tests/tensor/test_inplace.py tests/tensor/conv" - "tests/tensor/test_blas.py tests/tensor/test_elemwise.py tests/tensor/test_math_scipy.py" exclude: - python-version: "3.10" @@ -123,14 +121,21 @@ jobs: numpy-version: "~=2.1.0" fast-compile: 0 float32: 0 - part: "tests/link/numba" + part: "tests/link/numba --ignore=tests/link/numba/test_slinalg.py" - install-numba: 1 os: "ubuntu-latest" python-version: "3.13" numpy-version: "~=2.1.0" fast-compile: 0 float32: 0 - part: "tests/link/numba" + part: "tests/link/numba --ignore=tests/link/numba/test_slinalg.py" + - install-numba: 1 + os: "ubuntu-latest" + python-version: "3.13" + numpy-version: "~=2.1.0" + fast-compile: 0 + float32: 0 + part: "tests/link/numba/test_slinalg.py" - install-jax: 1 os: "ubuntu-latest" python-version: "3.10" @@ -207,7 +212,7 @@ jobs: if [[ $INSTALL_TORCH == "1" ]]; then micromamba install --yes -q -c conda-forge "python~=${PYTHON_VERSION}" pytorch pytorch-cuda=12.1 "mkl<=2024.0" -c pytorch -c nvidia; fi if [[ $INSTALL_XARRAY == "1" ]]; then micromamba install --yes -q -c conda-forge "python~=${PYTHON_VERSION}" xarray xarray-einstats; fi pip install pytest-sphinx - + pip install -e ./ micromamba list && pip freeze python -c 'import pytensor; print(pytensor.config.__str__(print_doc=False))' @@ -218,7 +223,7 @@ jobs: fi env: PYTHON_VERSION: ${{ matrix.python-version }} - NUMPY_VERSION: ${{ matrix.numpy-version }} + NUMPY_VERSION: ${{ matrix.numpy-version }} INSTALL_NUMBA: ${{ matrix.install-numba }} INSTALL_JAX: ${{ matrix.install-jax }} INSTALL_TORCH: ${{ matrix.install-torch}} @@ -343,4 +348,3 @@ jobs: directory: ./coverage/ fail_ci_if_error: true token: ${{ secrets.CODECOV_TOKEN }} - diff --git a/tests/link/numba/test_pad.py b/tests/link/numba/test_pad.py index 437c325d6c..aea0efab26 100644 --- a/tests/link/numba/test_pad.py +++ b/tests/link/numba/test_pad.py @@ -11,6 +11,9 @@ RTOL = ATOL = 1e-6 if floatX.endswith("64") else 1e-3 +@pytest.mark.skip( + "Numba compilation is too slow and this is just a test for dispatch of OpFromGraph" +) @pytest.mark.parametrize( "mode, kwargs", [ diff --git a/tests/tensor/test_basic.py b/tests/tensor/test_basic.py index f3b68f0e14..8e9e8d0ab1 100644 --- a/tests/tensor/test_basic.py +++ b/tests/tensor/test_basic.py @@ -191,15 +191,7 @@ def _numpy_second(x, y): name="SecondBroadcastTester", op=second, expected=_numpy_second, - good=dict( - itertools.chain( - multi_dtype_checks((4, 5), (5,)), - multi_dtype_checks((2, 3, 2), (3, 2)), - multi_dtype_checks((2, 3, 2), (2,)), - ) - ), - # I can't think of any way to make this fail at build time - # Just some simple smoke tests + good=dict(multi_dtype_checks((4, 2, 3, 2), (3, 2))), bad_runtime=dict( fail1=(random(5, 4), random(5)), fail2=(random(3, 2, 3), random(6, 9)), @@ -207,26 +199,15 @@ def _numpy_second(x, y): ), ) -# We exclude local_fill_to_alloc because it optimizes the "second" node -# away from the graph. +# We exclude local_fill_to_alloc because it optimizes the "second" node away from the graph. TestSecondSameRank = makeTester( name="SecondSameRankTester", op=second, expected=_numpy_second, - good=dict( - itertools.chain( - multi_dtype_checks((4, 5), (4, 5)), - multi_dtype_checks((1, 2), (3, 2)), - multi_dtype_checks((3, 2), (1, 2)), - ) - ), - # These sizes are not broadcastable to one another - # and SHOULD raise an error, but currently don't. + good=dict(multi_dtype_checks((4, 5), (4, 1))), bad_runtime=dict( - itertools.chain( - multi_dtype_checks((4, 5), (5, 4)), - multi_dtype_checks((1, 5), (5, 4)), - ) + fail1=(random(4, 5), random(5, 4)), + fail2=(integers(1, 5), integers(5, 4)), ), mode=get_default_mode().excluding("local_fill_to_alloc", "local_useless_fill"), )