esda implementation problem with new numba version
Hello I'm a maintainer of the esda with the Debian distro.
I would like to inform you that 'esda', given its importance, has become part of the Debian repositories.
Recently, with the numba update, esda started showing implementation errors in its unit tests. I think this numba update is also affecting the eda code itself.
follow the error logs:
FAILED esda/tests/test_getisord.py::G_Local_Tester::test_G_Local_Binary - numba.core.errors.TypingError: Failed in
nopython mode pipeline (step: nopython frontend) FAILED esda/tests/test_getisord.py::G_Local_Tester::test_G_Local_Row_Standardized - numba.core.errors.TypingError: Failed in nopython mode pipeline (step: nopython frontend) FAILED esda/tests/test_getisord.py::G_Local_Tester::test_G_star_Local_Binary - numba.core.errors.TypingError: Failed in nopython mode pipeline (step: nopython frontend) FAILED esda/tests/test_getisord.py::G_Local_Tester::test_G_star_Row_Standardized - numba.core.errors.TypingError: Failed in nopython mode pipeline (step: nopython frontend) FAILED esda/tests/test_getisord.py::G_Local_Tester::test_by_col - numba.core.errors.TypingError: Failed in nopython mode pipeline (step: nopython frontend) FAILED esda/tests/test_getisord.py::i::test_G_Local_Binary - numba.core.errors.TypingError: Failed in nopython mode pipeline (step: nopython frontend) FAILED esda/tests/test_getisord.py::i::test_G_Local_Row_Standardized - numba.core.errors.TypingError: Failed in nopython mode pipeline (step: nopython frontend) FAILED esda/tests/test_getisord.py::i::test_G_star_Local_Binary - numba.core.errors.TypingError: Failed in nopython mode pipeline (step: nopython frontend) FAILED esda/tests/test_getisord.py::i::test_G_star_Row_Standardized - numba.core.errors.TypingError: Failed in nopython mode pipeline (step: nopython frontend) FAILED esda/tests/test_getisord.py::i::test_by_col - numba.core.errors.TypingError: Failed in nopython mode pipeline (step: nopython frontend) FAILED esda/tests/test_ljc.py::Join_Counts_Locals_Tester::test_Join_Counts_Locals - numba.core.errors.TypingError: Failed in nopython mode pipeline (step: nopython frontend) FAILED esda/tests/test_ljc.py::i::test_Join_Counts_Locals - numba.core.errors.TypingError: Failed in nopython mode pipeline (step: nopython frontend) FAILED esda/tests/test_ljc_bv.py::Local_Join_Counts_BV_Tester::test_Local_Join_Counts_BV - numba.core.errors.TypingError: Failed in nopython mode pipeline (step: nopython frontend) FAILED esda/tests/test_ljc_bv.py::i::test_Local_Join_Counts_BV - numba.core.errors.TypingError: Failed in nopython mode pipeline (step: nopython frontend) FAILED esda/tests/test_ljc_mv.py::Local_Join_Counts_MV_Tester::test_Local_Join_Counts_MV - numba.core.errors.TypingError: Failed in nopython mode pipeline (step: nopython frontend) FAILED esda/tests/test_ljc_mv.py::i::test_Local_Join_Counts_MV - numba.core.errors.TypingError: Failed in nopython mode pipeline (step: nopython frontend) FAILED esda/tests/test_moran.py::Moran_Tester::test_z_consistency - numba.core.errors.TypingError: Failed in nopython mode pipeline (step: nopython frontend) FAILED esda/tests/test_moran.py::Moran_Local_Tester::test_Moran_Local - numba.core.errors.TypingError: Failed in nopython mode pipeline (step: nopython frontend) FAILED esda/tests/test_moran.py::Moran_Local_Tester::test_Moran_Local_parallel - numba.core.errors.TypingError: Failed in nopython mode pipeline (step: nopython frontend) FAILED esda/tests/test_moran.py::Moran_Local_Tester::test_local_moments - numba.core.errors.TypingError: Failed in nopython mode pipeline (step: nopython frontend) FAILED esda/tests/test_moran.py::Moran_Local_BV_Tester::test_Moran_Local_BV - numba.core.errors.TypingError: Failed in nopython mode pipeline (step: nopython frontend) FAILED esda/tests/test_moran.py::Moran_Local_Rate_Tester::test_moran_rate - numba.core.errors.TypingError: Failed in nopython mode pipeline (step: nopython frontend) FAILED esda/tests/test_moran.py::i::test_moran_rate - numba.core.errors.TypingError: Failed in nopython mode pipeline (step: nopython frontend) FAILED esda/tests/test_util.py::Fdr_Tester::test_fdr - numba.core.errors.TypingError: Failed in nopython mode pipeline (step: nopython frontend) FAILED esda/tests/test_util.py::i::test_fdr - numba.core.errors.TypingError: Failed in nopython mode pipeline (step: nopython frontend) ======================== 25 failed, 57 passed, 11 skipped, 37 warnings in 13.53s
Nilson Silva.
Thanks! For clarity, what version of numba is this failing under?
The version I am using and getting the errors is 0.56.4 https://tracker.debian.org/pkg/numba
And it is the most current version of the numba project.
https://github.com/numba/numba
Is there any work around for this? I have been facing the same issue. Are there older versions of numba it does work with that I can switch to?
@Palak-B can you let us know what version of numba you are running as this is passing on the ci?
Sure. Numba version: 0.56.4
i can see another debian bug report here https://www.mail-archive.com/[email protected]/msg1889349.html
and im hitting the same Failed in nopython mode pipeline (step: native lowering) error in segregation, and i cant seem to ID where it emanates from. I can't reproduce locally
xref https://github.com/pysal/libpysal/issues/526
I think I am running into another issue related to an updated version of numba. I am trying to run moran_local and get the following error. I am using numba 0.58.1
_TypingError: Failed in nopython mode pipeline (step: nopython frontend)
Failed in nopython mode pipeline (step: nopython frontend)
Failed in nopython mode pipeline (step: nopython frontend)
No implementation of function Function(
_impl(array(float32, 2d, C), array(float64, 1d, C))
There are 2 candidate implementations:
- Of which 2 did not match due to:
Intrinsic in function 'dot_2_impl.
._impl': File: numba/np/linalg.py: Line 543. With argument(s): '(array(float32, 2d, C), array(float64, 1d, C))': Rejected as the implementation raised a specific error: TypingError: '@' arguments must all have the same dtype raised from /opt/homebrew/anaconda3/lib/python3.10/site-packages/numba/np/linalg.py:563
During: resolving callee type: Function(
File "../../../../../opt/homebrew/anaconda3/lib/python3.10/site-packages/numba/np/linalg.py", line 582:
def _dot2_codegen(context, builder, sig, args):
return lambda left, right: _impl(left, right)
^
During: typing of intrinsic-call at /opt/homebrew/anaconda3/lib/python3.10/site-packages/esda/moran.py (1826)
File "../../../../../opt/homebrew/anaconda3/lib/python3.10/site-packages/esda/moran.py", line 1826:
def _moran_local_crand(i, z, permuted_ids, weights_i, scaling):
During: resolving callee type: type(CPUDispatcher(<function _moran_local_crand at 0x168a79cf0>)) During: typing of call at /opt/homebrew/anaconda3/lib/python3.10/site-packages/esda/crand.py (328)
During: resolving callee type: type(CPUDispatcher(<function _moran_local_crand at 0x168a79cf0>)) During: typing of call at /opt/homebrew/anaconda3/lib/python3.10/site-packages/esda/crand.py (328)
During: resolving callee type: type(CPUDispatcher(<function _moran_local_crand at 0x168a79cf0>)) During: typing of call at /opt/homebrew/anaconda3/lib/python3.10/site-packages/esda/crand.py (328)
File "../../../../../opt/homebrew/anaconda3/lib/python3.10/site-packages/esda/crand.py", line 328:
def compute_chunk(