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

Issue with numba 0.59.0 #133

Open
israelmcmc opened this issue Feb 8, 2024 · 7 comments
Open

Issue with numba 0.59.0 #133

israelmcmc opened this issue Feb 8, 2024 · 7 comments
Labels
dependencies Installation problems related to external packages

Comments

@israelmcmc
Copy link
Collaborator

David Palmore reported an issue installing cosipy related to numba version 0.59.0. It's not really an issue with cosipy, but I'll add it here to remember me to add it to the troubleshooting section in the documentation. David fixed this by downgrading to numba 0.57.0

@israelmcmc israelmcmc added the dependencies Installation problems related to external packages label Feb 8, 2024
@ckarwin
Copy link
Contributor

ckarwin commented Feb 8, 2024

Do you know what in cosipy is using numba? Is it a 3ML dependency?

@israelmcmc
Copy link
Collaborator Author

Here's the dependency tree in my environment. It seems numba is needed by astromodels and sparse.

pipdeptree.txt

@ckarwin
Copy link
Contributor

ckarwin commented Feb 8, 2024

Ah, I see, thanks.

@avalluvan
Copy link

avalluvan commented Feb 15, 2024

To add, the API @numba.generated_jit has been deprecated in v0.59.0. "Use of @numba.extending.overload and the high-level extension API is recommended as a replacement."

@StevenBoggs
Copy link

Using the command:
% conda install numba=0.57.0
Seemed to get me past this hurdle for now....

@ckarwin
Copy link
Contributor

ckarwin commented Feb 16, 2024

Pierre Jean had the same issue with numba. Downgrading to version 0.57.0 also worked for him. Below I copy his initial error message, for reference:

The cosipy installation seemed to be fine (via conda) on my user on the server of Jürgen (linux) but I obtained the following error with the python command "from cosipy import BinnedData"

from cosipy import BinnedData
ImportError: cannot import name 'generated_jit' from 'numba' (/home/jean/.conda/envs/cosipy/lib/python3.10/site-packages/numba/__init__.py)

@israelmcmc
Copy link
Collaborator Author

I looked into this a little bit more. The traceback shows the issue propagates from the interpolation package (which call numba's generated_jit, and is called by astromodels). See this relevant issues:
EconForge/interpolation.py#103
EconForge/interpolation.py#110

I made a new release (v0.0.2a4) adding restricting numba<=0.58.0. It will throw a deprecation warning instead of an error.

I'll leave this issue open since we should remove the restriction on the numba version once this is fixed in the dependencies.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Installation problems related to external packages
Projects
None yet
Development

No branches or pull requests

4 participants