pydata / sparse

Sparse multi-dimensional arrays for the PyData ecosystem
https://sparse.pydata.org
BSD 3-Clause "New" or "Revised" License
581 stars 123 forks source link

NumPy 1.x CI. #705

Closed hameerabbasi closed 1 month ago

mtsokol commented 1 month ago

Hmm I think we have some issue with CI: array_api_tests (Finch) hangs on 95% for some reason (after rerunning it).

hameerabbasi commented 1 month ago

Yeah, I saw. 👀 Let me run it locally.

hameerabbasi commented 1 month ago

Yeah, I saw. 👀 Let me run it locally.

Hmm, passes doesn't hang for me locally. I get the following failures though:

FAILED ../array-api-tests/meta_tests/test_pytest_helpers.py::test_assert_array_elements - AttributeError: 'float' object has no attribute '_elemwise_op'
FAILED ../array-api-tests/meta_tests/test_array_helpers.py::test_notequal - AssertionError: logical_not is not defined in sparse
FAILED ../array-api-tests/meta_tests/test_utils.py::test_int_to_dtype - juliacall.JuliaError: InexactError: trunc(UInt8, -1)
FAILED ../array-api-tests/meta_tests/test_hypothesis_helpers.py::test_symmetric_matrices - AttributeError: 'Tensor' object has no attribute 'mT'
FAILED ../array-api-tests/meta_tests/test_hypothesis_helpers.py::test_positive_definite_matrices - AssertionError: broadcast_to is not defined in sparse
hameerabbasi commented 1 month ago

Yeah, I saw. 👀 Let me run it locally.

Hmm, ~passes~ doesn't hang for me locally. I get the following failures though:

FAILED ../array-api-tests/meta_tests/test_pytest_helpers.py::test_assert_array_elements - AttributeError: 'float' object has no attribute '_elemwise_op'
FAILED ../array-api-tests/meta_tests/test_array_helpers.py::test_notequal - AssertionError: logical_not is not defined in sparse
FAILED ../array-api-tests/meta_tests/test_utils.py::test_int_to_dtype - juliacall.JuliaError: InexactError: trunc(UInt8, -1)
FAILED ../array-api-tests/meta_tests/test_hypothesis_helpers.py::test_symmetric_matrices - AttributeError: 'Tensor' object has no attribute 'mT'
FAILED ../array-api-tests/meta_tests/test_hypothesis_helpers.py::test_positive_definite_matrices - AssertionError: broadcast_to is not defined in sparse

Same for Docker:

FROM --platform=amd64 python:3.10
RUN apt install git
WORKDIR /root
RUN git clone --depth 1 https://github.com/pydata/sparse.git
RUN git clone https://github.com/data-apis/array-api-tests.git
WORKDIR /root/array-api-tests
RUN git checkout 33f2d2ea2f3dd2b3ceeeb4519d55e08096184149
RUN git submodule update --init
WORKDIR /root/sparse
RUN pip install ".[all]"
RUN pip install -r "../array-api-tests/requirements.txt"
RUN python -c "import finch"
ENTRYPOINT ARRAY_API_TESTS_MODULE=sparse SPARSE_BACKEND=Finch pytest ../array-api-tests -v -c ../array-api-tests/pytest.ini --max-examples=2 --derandomize --disable-deadline -o xfail_strict=True --xfails-file ../sparse/ci/Finch-array-api-xfails.txt --skips-file ../sparse/ci/Finch-array-api-skips.txt --disable-warnings -n 4