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

numba 0.57.0 raises NumbaDeprecationWarning regarding 'nopython' kwarg #1004

Closed
dpoznik opened this issue May 3, 2023 · 6 comments
Closed

Comments

@dpoznik
Copy link

dpoznik commented May 3, 2023

Importing umap 0.5.3 with numba 0.57.0 (released today) elicits the following NumbaDeprecationWarning:

In [1]: import umap
/usr/local/lib/python3.11/site-packages/umap/distances.py:1063: NumbaDeprecationWarning: The 'nopython' keyword argument was not supplied to the 'numba.jit' decorator. The implicit default value for this argument is currently False, but it will be changed to True in Numba 0.59.0. See https://numba.readthedocs.io/en/stable/reference/deprecation.html#deprecation-of-object-mode-fall-back-behaviour-when-using-jit for details.
  @numba.jit()
/usr/local/lib/python3.11/site-packages/umap/distances.py:1071: NumbaDeprecationWarning: The 'nopython' keyword argument was not supplied to the 'numba.jit' decorator. The implicit default value for this argument is currently False, but it will be changed to True in Numba 0.59.0. See https://numba.readthedocs.io/en/stable/reference/deprecation.html#deprecation-of-object-mode-fall-back-behaviour-when-using-jit for details.
  @numba.jit()
/usr/local/lib/python3.11/site-packages/umap/distances.py:1086: NumbaDeprecationWarning: The 'nopython' keyword argument was not supplied to the 'numba.jit' decorator. The implicit default value for this argument is currently False, but it will be changed to True in Numba 0.59.0. See https://numba.readthedocs.io/en/stable/reference/deprecation.html#deprecation-of-object-mode-fall-back-behaviour-when-using-jit for details.
  @numba.jit()
/usr/local/lib/python3.11/site-packages/umap/umap_.py:660: NumbaDeprecationWarning: The 'nopython' keyword argument was not supplied to the 'numba.jit' decorator. The implicit default value for this argument is currently False, but it will be changed to True in Numba 0.59.0. See https://numba.readthedocs.io/en/stable/reference/deprecation.html#deprecation-of-object-mode-fall-back-behaviour-when-using-jit for details.
  @numba.jit()

In [2]: umap.__version__
Out[2]: '0.5.3'

In [3]: umap.numba.__version__
Out[3]: '0.57.0'

Not a big deal, but figured I'd mention.

Here is that numba link:
https://numba.readthedocs.io/en/stable/reference/deprecation.html#deprecation-of-object-mode-fall-back-behaviour-when-using-jit

@dpoznik dpoznik changed the title NumbaDeprecationWarning about nopython keyword argument raised by numba 0.57.0 NumbaDeprecationWarning about nopython kwarg raised by numba 0.57.0 May 3, 2023
@lmcinnes
Copy link
Owner

lmcinnes commented May 3, 2023

Thanks; I'll try to get around to updating those soon.

@dpoznik dpoznik changed the title NumbaDeprecationWarning about nopython kwarg raised by numba 0.57.0 numba 0.57.0 raises NumbaDeprecationWarning regarding 'nopython' kwarg May 4, 2023
@buhrmann
Copy link

FWIW, I'm also getting segmentation faults at runtime which I don't get with the same code and numba<0.57

@gmarkall
Copy link

gmarkall commented Jun 2, 2023

@buhrmann I believe the segfaults were due to a patch not being applied to LLVM in conda-forge. conda-forge/llvmdev-feedstock#209 is now merged and new packages are uploaded - if you update libllvm14 (e.g. with conda update libllvm14 and run again, are the segfaults now resolved?

huddlej added a commit to blab/pathogen-embed that referenced this issue Jun 28, 2023
Ignores recent Numba warnings that are related to how umap-learn uses
Numba and outside of our control as users of umap-learn. Following
recommendations from the Numba deprecation guide [1], we explicitly
ignore the `NumbaDeprecationWarning` and pin the maximum Numba version
that will support the current umap-learn usage. We also pin umap-learn
to a maximum minor version in preparation for a potential new minor
version that addresses the Numba issue [2]

[1] https://numba.readthedocs.io/en/stable/reference/deprecation.html#deprecation-of-object-mode-fall-back-behaviour-when-using-jit
[2] lmcinnes/umap#1004
@l8l
Copy link

l8l commented Aug 2, 2023

I still get this error as of August 2nd 2023. It seems that it is very simple to fix as one only needs to add nopython=True in all numba.jit() code fragments. Is it already clear when this will be implemented?

@hoondy
Copy link

hoondy commented Aug 28, 2023

try reinstalling the latest from the master branch. warnings gone after they switched calls to numba.njit

pip install --upgrade --force-reinstall git+https://github.com/lmcinnes/umap@master

@dpoznik
Copy link
Author

dpoznik commented Sep 15, 2023

Resolved in 0.5.4. Thanks!

@dpoznik dpoznik closed this as completed Sep 15, 2023
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