Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

esda implementation problem with new numba version #240

Open
Nilsonfsilva opened this issue Feb 11, 2023 · 8 comments
Open

esda implementation problem with new numba version #240

Nilsonfsilva opened this issue Feb 11, 2023 · 8 comments

Comments

@Nilsonfsilva
Copy link

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.

@ljwolf
Copy link
Member

ljwolf commented Feb 11, 2023

Thanks! For clarity, what version of numba is this failing under?

@Nilsonfsilva
Copy link
Author

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

@Palak-B
Copy link

Palak-B commented Jul 27, 2023

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?

@sjsrey
Copy link
Member

sjsrey commented Jul 27, 2023

@Palak-B can you let us know what version of numba you are running as this is passing on the ci?

@Palak-B
Copy link

Palak-B commented Jul 27, 2023

Sure. Numba version: 0.56.4

@knaaptime
Copy link
Member

i can see another debian bug report here https://www.mail-archive.com/debian-bugs-dist@lists.debian.org/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

@sjsrey
Copy link
Member

sjsrey commented Aug 3, 2023

xref pysal/libpysal#526

@hvagasky
Copy link

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() found for signature:

_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()
During: typing of call at /opt/homebrew/anaconda3/lib/python3.10/site-packages/numba/np/linalg.py (582)

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):

zi, zrand = _prepare_univariate(i, z, permuted_ids, other_weights)
return zi * (zrand @ other_weights + self_weight * zi) * 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(

mask[chunk_start + i] = False
rstats = stat_func(chunk_start + i, z, permuted_ids, weights_i, scaling)
^_

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants