Bug#1052388: python-sparse: autopkgtest needs update for new version of numba

Paul Gevers elbrus at debian.org
Thu Sep 21 10:26:15 BST 2023


Source: python-sparse
Version: 0.13.0-1
Severity: serious
X-Debbugs-CC: numba at packages.debian.org
Tags: sid trixie
User: debian-ci at lists.debian.org
Usertags: needs-update
Control: affects -1 src:numba

Dear maintainer(s),

With a recent upload of numba the autopkgtest of python-sparse fails in 
testing when that autopkgtest is run with the binary packages of numba 
from unstable. It passes when run with only packages from testing. In 
tabular form:

                        pass            fail
numba                  from testing    0.57.1+dfsg-1
python-sparse          from testing    0.13.0-1
all others             from testing    from testing

I copied some of the output at the bottom of this report.

Currently this regression is blocking the migration of numba to testing 
[1]. Of course, numba shouldn't just break your autopkgtest (or even 
worse, your package), but it seems to me that numba isn't going to fix 
the situation.

If this is a real problem in your package (and not only in your 
autopkgtest), the right binary package(s) from numba should really add a 
versioned Breaks on the unfixed version of (one of your) package(s). 
Note: the Breaks is nice even if the issue is only in the autopkgtest as 
it helps the migration software to figure out the right versions to 
combine in the tests.

More information about this bug and the reason for filing it can be found on
https://wiki.debian.org/ContinuousIntegration/RegressionEmailInformation

Paul

[1] https://qa.debian.org/excuses.php?package=numba

https://ci.debian.net/data/autopkgtest/testing/amd64/p/python-sparse/38059394/log.gz

115s =================================== FAILURES 
===================================
115s _______________ test_tensordot[coo-gcxs-a_shape1-b_shape1-axes1] 
_______________
115s
115s a_shape = (3, 4), b_shape = (4, 3), axes = (0, 1), a_format = 'coo'
115s b_format = 'gcxs'
115s
115s     @pytest.mark.parametrize(
115s         "a_shape,b_shape,axes",
115s         [
115s             [(3, 4), (4, 3), (1, 0)],
115s             [(3, 4), (4, 3), (0, 1)],
115s             [(3, 4, 5), (4, 3), (1, 0)],
115s             [(3, 4), (5, 4, 3), (1, 1)],
115s             [(3, 4), (5, 4, 3), ((0, 1), (2, 1))],
115s             [(3, 4), (5, 4, 3), ((1, 0), (1, 2))],
115s             [(3, 4, 5), (4,), (1, 0)],
115s             [(4,), (3, 4, 5), (0, 1)],
115s             [(4,), (4,), (0, 0)],
115s             [(4,), (4,), 0],
115s         ],
115s     )
115s     @pytest.mark.parametrize(
115s         "a_format, b_format",
115s         [("coo", "coo"), ("coo", "gcxs"), ("gcxs", "coo"), ("gcxs", 
"gcxs")],
115s     )
115s     def test_tensordot(a_shape, b_shape, axes, a_format, b_format):
115s         sa = sparse.random(a_shape, density=0.5, format=a_format)
115s         sb = sparse.random(b_shape, density=0.5, format=b_format)
115s
115s         a = sa.todense()
115s         b = sb.todense()
115s
115s         a_b = np.tensordot(a, b, axes)
115s
115s         # tests for return_type=None
115s         sa_sb = sparse.tensordot(sa, sb, axes)
115s         sa_b = sparse.tensordot(sa, b, axes)
115s         a_sb = sparse.tensordot(a, sb, axes)
115s
115s         assert_eq(a_b, sa_sb)
115s         assert_eq(a_b, sa_b)
115s         assert_eq(a_b, a_sb)
115s         if all(isinstance(arr, COO) for arr in [sa, sb]):
115s             assert isinstance(sa_sb, COO)
115s         else:
115s             assert isinstance(sa_sb, GCXS)
115s         assert isinstance(sa_b, np.ndarray)
115s         assert isinstance(a_sb, np.ndarray)
115s
115s         # tests for return_type=COO
115s         sa_b = sparse.tensordot(sa, b, axes, return_type=COO)
115s >       a_sb = sparse.tensordot(a, sb, axes, return_type=COO)
115s
115s tests/test_dot.py:58:
115s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
_ _ _ _ _ _
115s /usr/lib/python3/dist-packages/sparse/_common.py:198: in tensordot
115s     res = _dot(at, bt, return_type)
115s /usr/lib/python3/dist-packages/sparse/_common.py:425: in _dot
115s     out = GCXS(
115s 
/usr/lib/python3/dist-packages/sparse/_compressed/compressed.py:195: in 
__init__
115s     self._prune()
115s 
/usr/lib/python3/dist-packages/sparse/_compressed/compressed.py:817: in 
_prune
115s     np.cumsum(np.bincount(coords[0], minlength=row_size), 
out=indptr[1:])
115s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
_ _ _ _ _ _
115s
115s args = (array([7304680739967889201, 3701732606794297453, 
        1,
115s                          1,                   2,                   2,
115s                          3,                   3]),)
115s kwargs = {'minlength': 4}
115s relevant_args = (array([7304680739967889201, 3701732606794297453, 
                 1,
115s                          1,                   2,                   2,
115s                          3,                   3]), None)
115s
115s >   ???
115s E   ValueError: array is too big; `arr.size * arr.dtype.itemsize` 
is larger than the maximum possible size.
115s
115s <__array_function__ internals>:200: ValueError
115s _______________ test_tensordot[coo-gcxs-a_shape3-b_shape3-axes3] 
_______________
115s
115s a_shape = (3, 4), b_shape = (5, 4, 3), axes = (1, 1), a_format = 'coo'
115s b_format = 'gcxs'
115s
115s     @pytest.mark.parametrize(
115s         "a_shape,b_shape,axes",
115s         [
115s             [(3, 4), (4, 3), (1, 0)],
115s             [(3, 4), (4, 3), (0, 1)],
115s             [(3, 4, 5), (4, 3), (1, 0)],
115s             [(3, 4), (5, 4, 3), (1, 1)],
115s             [(3, 4), (5, 4, 3), ((0, 1), (2, 1))],
115s             [(3, 4), (5, 4, 3), ((1, 0), (1, 2))],
115s             [(3, 4, 5), (4,), (1, 0)],
115s             [(4,), (3, 4, 5), (0, 1)],
115s             [(4,), (4,), (0, 0)],
115s             [(4,), (4,), 0],
115s         ],
115s     )
115s     @pytest.mark.parametrize(
115s         "a_format, b_format",
115s         [("coo", "coo"), ("coo", "gcxs"), ("gcxs", "coo"), ("gcxs", 
"gcxs")],
115s     )
115s     def test_tensordot(a_shape, b_shape, axes, a_format, b_format):
115s         sa = sparse.random(a_shape, density=0.5, format=a_format)
115s         sb = sparse.random(b_shape, density=0.5, format=b_format)
115s
115s         a = sa.todense()
115s         b = sb.todense()
115s
115s         a_b = np.tensordot(a, b, axes)
115s
115s         # tests for return_type=None
115s         sa_sb = sparse.tensordot(sa, sb, axes)
115s         sa_b = sparse.tensordot(sa, b, axes)
115s         a_sb = sparse.tensordot(a, sb, axes)
115s
115s         assert_eq(a_b, sa_sb)
115s         assert_eq(a_b, sa_b)
115s         assert_eq(a_b, a_sb)
115s         if all(isinstance(arr, COO) for arr in [sa, sb]):
115s             assert isinstance(sa_sb, COO)
115s         else:
115s             assert isinstance(sa_sb, GCXS)
115s         assert isinstance(sa_b, np.ndarray)
115s         assert isinstance(a_sb, np.ndarray)
115s
115s         # tests for return_type=COO
115s         sa_b = sparse.tensordot(sa, b, axes, return_type=COO)
115s >       a_sb = sparse.tensordot(a, sb, axes, return_type=COO)
115s
115s tests/test_dot.py:58:
115s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
_ _ _ _ _ _
115s /usr/lib/python3/dist-packages/sparse/_common.py:198: in tensordot
115s     res = _dot(at, bt, return_type)
115s /usr/lib/python3/dist-packages/sparse/_common.py:425: in _dot
115s     out = GCXS(
115s 
/usr/lib/python3/dist-packages/sparse/_compressed/compressed.py:195: in 
__init__
115s     self._prune()
115s 
/usr/lib/python3/dist-packages/sparse/_compressed/compressed.py:817: in 
_prune
115s     np.cumsum(np.bincount(coords[0], minlength=row_size), 
out=indptr[1:])
115s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
_ _ _ _ _ _
115s
115s args = (array([   92935672,           2,           8,  4294969460, 
   92935696,
115s         4294967297,    95773504, 25769803777,...   1,           1, 
          1,           1,
115s                  1,           1,           1,           1, 
  1]),)
115s kwargs = {'minlength': 3}
115s relevant_args = (array([   92935672,           2,           8, 
4294969460,    92935696,
115s         4294967297,    95773504, 25769803777,...           1, 
     1,           1,
115s                  1,           1,           1,           1, 
  1]), None)
115s
115s >   ???
115s E   numpy.core._exceptions._ArrayMemoryError: Unable to allocate 
256. GiB for an array with shape (34359738371,) and data type int64
115s
115s <__array_function__ internals>:200: MemoryError
115s _______________ test_tensordot[coo-gcxs-a_shape7-b_shape7-axes7] 
_______________
115s
115s a_shape = (4,), b_shape = (3, 4, 5), axes = (0, 1), a_format = 'coo'
115s b_format = 'gcxs'
115s
115s     @pytest.mark.parametrize(
115s         "a_shape,b_shape,axes",
115s         [
115s             [(3, 4), (4, 3), (1, 0)],
115s             [(3, 4), (4, 3), (0, 1)],
115s             [(3, 4, 5), (4, 3), (1, 0)],
115s             [(3, 4), (5, 4, 3), (1, 1)],
115s             [(3, 4), (5, 4, 3), ((0, 1), (2, 1))],
115s             [(3, 4), (5, 4, 3), ((1, 0), (1, 2))],
115s             [(3, 4, 5), (4,), (1, 0)],
115s             [(4,), (3, 4, 5), (0, 1)],
115s             [(4,), (4,), (0, 0)],
115s             [(4,), (4,), 0],
115s         ],
115s     )
115s     @pytest.mark.parametrize(
115s         "a_format, b_format",
115s         [("coo", "coo"), ("coo", "gcxs"), ("gcxs", "coo"), ("gcxs", 
"gcxs")],
115s     )
115s     def test_tensordot(a_shape, b_shape, axes, a_format, b_format):
115s         sa = sparse.random(a_shape, density=0.5, format=a_format)
115s         sb = sparse.random(b_shape, density=0.5, format=b_format)
115s
115s         a = sa.todense()
115s         b = sb.todense()
115s
115s         a_b = np.tensordot(a, b, axes)
115s
115s         # tests for return_type=None
115s         sa_sb = sparse.tensordot(sa, sb, axes)
115s         sa_b = sparse.tensordot(sa, b, axes)
115s         a_sb = sparse.tensordot(a, sb, axes)
115s
115s         assert_eq(a_b, sa_sb)
115s         assert_eq(a_b, sa_b)
115s         assert_eq(a_b, a_sb)
115s         if all(isinstance(arr, COO) for arr in [sa, sb]):
115s             assert isinstance(sa_sb, COO)
115s         else:
115s             assert isinstance(sa_sb, GCXS)
115s         assert isinstance(sa_b, np.ndarray)
115s         assert isinstance(a_sb, np.ndarray)
115s
115s         # tests for return_type=COO
115s         sa_b = sparse.tensordot(sa, b, axes, return_type=COO)
115s >       a_sb = sparse.tensordot(a, sb, axes, return_type=COO)
115s
115s tests/test_dot.py:58:
115s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
_ _ _ _ _ _
115s /usr/lib/python3/dist-packages/sparse/_common.py:198: in tensordot
115s     res = _dot(at, bt, return_type)
115s /usr/lib/python3/dist-packages/sparse/_common.py:425: in _dot
115s     out = GCXS(
115s 
/usr/lib/python3/dist-packages/sparse/_compressed/compressed.py:195: in 
__init__
115s     self._prune()
115s 
/usr/lib/python3/dist-packages/sparse/_compressed/compressed.py:817: in 
_prune
115s     np.cumsum(np.bincount(coords[0], minlength=row_size), 
out=indptr[1:])
115s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
_ _ _ _ _ _
115s
115s args = (array([140611529669312, 140611525615744, 140611529695520, 
140611526270736,
115s        140611529954992, 140611529497968, 140611530646432, 
140611530966048,
115s                      0,      4294967296]),)
115s kwargs = {'minlength': 1}
115s relevant_args = (array([140611529669312, 140611525615744, 
140611529695520, 140611526270736,
115s        140611529954992, 140611529497968, 140611530646432, 
140611530966048,
115s                      0,      4294967296]), None)
115s
115s >   ???
115s E   numpy.core._exceptions._ArrayMemoryError: Unable to allocate 
1023. TiB for an array with shape (140611530966049,) and data type int64
115s
115s <__array_function__ internals>:200: MemoryError

-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature.asc
Type: application/pgp-signature
Size: 495 bytes
Desc: OpenPGP digital signature
URL: <http://alioth-lists.debian.net/pipermail/debian-science-maintainers/attachments/20230921/56960427/attachment-0001.sig>


More information about the debian-science-maintainers mailing list