Numba warnings
See original GitHub issueFirst I want to thank you for sharing this great work. It is very useful for me. The first time I execute UMAP fit and transform I get some numba warnings. They do not seem to be critical, but they are somewhat disturbing.
numba.__version__
'0.44.0'
sys.version
'3.7.3 (default, Mar 27 2019, 22:11:17) \n[GCC 7.3.0]'
reducer = umap.UMAP(random_state=42)
reducer.fit(X)
Y = reducer.transform(X)
/home/mbr085/anaconda3/envs/divisivegater/lib/python3.7/site-packages/umap/umap_.py:349: NumbaWarning:
Compilation is falling back to object mode WITH looplifting enabled because Function "fuzzy_simplicial_set" failed type inference due to: Untyped global name 'nearest_neighbors': cannot determine Numba type of <class 'function'>
File "../../../../../anaconda3/envs/divisivegater/lib/python3.7/site-packages/umap/umap_.py", line 467:
def fuzzy_simplicial_set(
<source elided>
if knn_indices is None or knn_dists is None:
knn_indices, knn_dists, _ = nearest_neighbors(
^
@numba.jit()
/home/mbr085/anaconda3/envs/divisivegater/lib/python3.7/site-packages/numba/compiler.py:725: NumbaWarning: Function "fuzzy_simplicial_set" was compiled in object mode without forceobj=True.
File "../../../../../anaconda3/envs/divisivegater/lib/python3.7/site-packages/umap/umap_.py", line 350:
@numba.jit()
def fuzzy_simplicial_set(
^
self.func_ir.loc))
/home/mbr085/anaconda3/envs/divisivegater/lib/python3.7/site-packages/numba/compiler.py:734: NumbaDeprecationWarning:
Fall-back from the nopython compilation path to the object mode compilation path has been detected, this is deprecated behaviour.
For more information visit http://numba.pydata.org/numba-doc/latest/reference/deprecation.html#deprecation-of-object-mode-fall-back-behaviour-when-using-jit
File "../../../../../anaconda3/envs/divisivegater/lib/python3.7/site-packages/umap/umap_.py", line 350:
@numba.jit()
def fuzzy_simplicial_set(
^
warnings.warn(errors.NumbaDeprecationWarning(msg, self.func_ir.loc))
Issue Analytics
- State:
- Created 4 years ago
- Reactions:17
- Comments:22 (5 by maintainers)
Top Results From Across the Web
Suppressing Deprecation warnings - Numba
However, first is a small section on how to suppress deprecation warnings that may be raised from Numba so as to prevent warnings...
Read more >Suppressing Deprecation warnings - Numba documentation
Deprecation Notices . This section contains information about deprecation of behaviours, features and APIs that have become undesirable/obsolete.
Read more >python 3.x - Numba: How to Suppress - Stack Overflow
Disable all Numba messages of level WARNING or lower import logging; logger = logging.getLogger("numba"); logger.setLevel(logging.ERROR).
Read more >Faster Computation with Numba - Jupyter Notebooks Gallery
from numba import jit, njit, autojit, jitclass import numba as nb import math import warnings with warnings.catch_warnings(): warnings.simplefilter('ignore' ...
Read more >Why numba decorator cause 10 times slower run - Support
Is it related to this warning?? Can numba be applied efficiently on this code to get better performances? my machine: python 3.10; numpy...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
These are, indeed, non-critical – numba has just gotten a little more verbose about it’s warnings, and umap continues to be somewhat optimistic about how well numba can compile things. In this case numba is just letting you know that umap was a little over-optimistic and not as much could be as completely compiled as one might have hoped. I’ll try to fix this up in an upcoming release. Thanks for the heads up, it is appreciated.
I was getting the same warnings. I added the following code to my notebooks and it solved it.
This was based upon the StackExchange Post https://stackoverflow.com/questions/9031783/hide-all-warnings-in-ipython