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
NumPy 1.22 support #7754
Comments
I ran a quick check on OSX using the current Numba 0.56.0dev0 and Numpy 1.22.1 (via pip).
|
@esc Thanks for posting the log - I've created issues for each distinct type of error and added them to this issue. It's quite probable that some of them have a common root cause, but I've considered them all separately in case there are distinct causes. |
@gmarkall thank you! I imagine we can proceed to work on this once the Numpy 1.22 packages become available via https://anaconda.org/anaconda/numpy/files -- so that we can integrate this into our build farm and commence automated testing. |
After installing numba it downgrades numpy and then I get this error message:
Maybe in future versions, numba install could be adjusted to not break other installations? Possibly this upgrade round is a special situations, but it does have undesired side effects. |
@2sn thank you for your report. Which Python version are you using and on which platform did this occur? This error message is reminiscent of the one reported (and fixed) at: #7747 can you check if that fixes it for you too since this may now be a duplicate. |
I use current release versions on Pypi, including Python 3.10.1. What happens is as follows: FIrst Numpy 1.22.x was installed, then numba numba becomes available, it downgrades numpy to 1.21.5, which has a different API version, but some things were already compiled with the new version and cached. After de-installing numpy and numba, deleting cache, re-installation from Pypi, then it works. Just not out of the box. |
Thank you for your response @2sn . It sounds a bit weird. I am glad you managed to workaround the issue. If the issue returns or persists, please feel free to open a new issue with details, thank you! |
I posted it in the hope the solution may be useful to others. I have seen it on both, my linux install and on M1/MacOS 12.1. For me it occured because I had already installed numpy 1.22.x before installing numba, which downgraded it, maybe still used the newer numpy version to compile numba. |
Unfortunately, Numba doesn't have control over how package managers (in this case, pip) decide to use Numba's version constraint on NumPy. In this case, it sounds like pip downgraded NumPy without checking if the downgraded NumPy was still compatible with the other packages in your environment. Hopefully we can get NumPy 1.22 support working for Numba 0.56. |
Whereas not sure, I think what must have happened is that it used the installed numpy to compile numba - which was 1.22 - before replacing it. |
Numba dosen't provide support for the new 1.22 numpy versions. Thus, some pkgs like `shap` canno't be used whitout a proper downgrade. This downgrade should removed after numba team close the issue : (numba/numba/issues/7754)[numba/numba#7754]
Numba does not support the new version of NumPy (1.22). So some packages like `shap` can\'t be used without downgrading. The downgrade should be removed after a new release of the Numba pkg with the following issue addressed. [numba/numba/issues/7754](numba/numba#7754)
This is not actually 100% Pip's fault. The packages that were built against NumPy 1.22.0 should have an |
Issue arise when there is competing requirements. Numba seems to typically lag behind 1-2 versions in NumPy, and maybe one version in Python support. It seems a lot of effort to keep current just by volunteers. For me, I decided that this makes Numba not usable for my practical purposes. A nice tech demo, though. Well done! |
Things should improve with the coming data-apis standard |
Any updates here? I would really appreciate having the compatibility with numpy 1.22 |
Seems to work for me (running the dev versions of both numba and numpy) |
That's great! Are you planning a stable release soon? |
I'm not a developer of numba, sorry |
This issue really needs to be resolved, because we can not deploy numpy versions earlier than 1.22.3 given: |
I know you probably have no choice in the matter because you're bound by company policies, but just in case: those CVEs are all basically garbage. We (the NumPy team) are disputing and rejecting them where we can. You'd be fine ignoring them. |
Thank you, @rgommers. |
any update? |
Locally I've got a NumPy 1.22 support patch that's passing all tests on x86_64 linux. The next release of Numba (0.56) will have support for NumPy 1.22. |
any schedule to release 0.56? |
It is hoped that a release candidate (RC) for 0.56 will be produced in about two weeks' time (sometime around the middle of May 2022). There will then be the usual RC testing phase which is usually (order of) a few weeks, during which more RCs may need to be produced to fix any issues found and then these will also need to be tested. Release candidate and general release announcements etc will be made on Numba's discourse forum https://numba.discourse.group/, in the "Announcements" section. |
For tracking issues related to NumPy 1.22 support.
Known issues so far:
ufunc did not contain a loop with signature matching types
error with NumPy 1.22 #7756return type must be specified for object mode
with NumPy 1.22 #7757np.MachAr
causes test fail with NumPy 1.22 #7758test_gitdiff
fails with NumPy 1.22 #7759The text was updated successfully, but these errors were encountered: