question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

First 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:closed
  • Created 4 years ago
  • Reactions:17
  • Comments:22 (5 by maintainers)

github_iconTop GitHub Comments

18reactions
lmcinnescommented, Jun 13, 2019

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.

12reactions
00krishnacommented, Jun 26, 2019

I was getting the same warnings. I added the following code to my notebooks and it solved it.

import warnings
warnings.filterwarnings('ignore')

This was based upon the StackExchange Post https://stackoverflow.com/questions/9031783/hide-all-warnings-in-ipython

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found