Closed
Description
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))
Metadata
Metadata
Assignees
Labels
Projects
Milestone
Relationships
Development
No branches or pull requests
Activity
lmcinnes commentedon 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.
00krishna commentedon Jun 26, 2019
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
Kimi71Jedidiah commentedon Jul 13, 2019
I came across the same problem!

S.umap(max_pc=max_pc,n_neighbors=k,min_dist=0.05)
lmcinnes commentedon Jul 14, 2019
This is actually fine -- the latest version of numba now issues warning for routines it couldn't completely compile. There will be a release of umap-learn soon that will remove the ineffective jit instructions and thus remove the warnings.
sjfleming commentedon Aug 2, 2019
Could you not do
@numba.jit(forceobj=True)
?lmcinnes commentedon Aug 5, 2019
That might we work yes. Right now it is mostly just a matter of having the time to sit down and go through all the options and the code and make changes. I was very busy last month, and am on vacation right now and trying not to look at code. Hopefully I can make some time in a couple of weeks.
sleighsoft commentedon Aug 8, 2019
Enjoy your vacation :)
To help you resolve the warnings quickly I compiled a list of all numba errors.
A list of warnings I currently see:
sleighsoft commentedon Aug 14, 2019
Changed in: afb819e
sleighsoft commentedon Sep 5, 2019
Should be resolved in
0.3.10release 0.4EDIT:
This warning is caused by umap-learn package and is just that. A warning that numba, a package used to speed up code execution by JIT compiling code, could not optimize the code that was annotated to be JIT compiled.
This is 100% my bad. I thought @lmcinnes added this to 0.3.10 but I think it only made it into the upcoming release of 0.4.
The PR for the changes is here #287
asfix commentedon Oct 16, 2019
The keyword argument 'parallel=True' was specified but no transformation for
parallel execution was possible.
To find out why, try turning on parallel diagnostics, see
http://numba.pydata.org/numba-doc/latest/user/parallel.html#diagnostics for
help.File "../umap/nndescent.py", line 47:
@numba.njit(parallel=True)
def nn_descent(
I am having this problem too..
/usr/local/lib/python3.6/dist-packages/umap/spectral.py:229: UserWarning: Embedding a total of 178 separate connected components using meta-embedding (experimental)
n_components
/usr/local/lib/python3.6/dist-packages/sklearn/metrics/pairwise.py:1575: DataConversionWarning: Data was converted to boolean for metric jaccard
warnings.warn(msg, DataConversionWarning)
When I press a key, I started to get another message. Would not I run my script and obtain reduced dimensions?
lmcinnes commentedon Oct 16, 2019
Sorry @asfix ; these are just warnings and don't represent a problem beyond the fact that various things have been done in the processing that a user may wish to be aware of. It should all run without problem, but there may be some warning messages flashing by.
suluxan commentedon Oct 31, 2019
Hey,
We are getting this same error but the warnings are causing our pipeline to fail rather than just skip over them. Is there any way to ignore warnings? Or has this been addressed?
i.e.
sleighsoft commentedon Nov 1, 2019
It has been addressed in 0.4dev. Could you try with that branch, please. And report back any issues.
suluxan commentedon Nov 14, 2019
Is the 0.4dev only available for python 3.5?
sleighsoft commentedon Nov 19, 2019
If I remember correctly there was a PR that included the @ operator which is only available in Python 3.5.
I cannot find the PR but I assume that when you don't use that code path you are fine to use a version lower than 3.5
lmcinnes commentedon Nov 20, 2019
I believe future releases will be targeting 3.5 and upwards. So things may work for now, but i a version or so you'll likely need a newer python if you haven't gotten onto 3.5 or newer.
suluxan commentedon Nov 20, 2019
Yeah there was build problems on python 2.7 due to the @ but we've updated to 3.7.3 and everything is smooth now! Thank you very much
moldach commentedon Jan 28, 2020
I'm seeking clarity on:
The keyword argument 'parallel=True' was specified but no transformation for parallel execution was possible.
I'm trying to do some benchmarking and would like to know if this means that
UMAP
only ran on one core?Just found issue #317 from November 2019 so I'm guessing parallelization is still not available out-of-the-box?
sleighsoft commentedon Feb 2, 2020
This can just mean that a single function within UMAP could not be optimized to be run in parallel by Numba. It does not mean that everything else, that can be, wasn't executed in parallel. This should not happen with the current dev branch. If so, please report.
naity commentedon Feb 4, 2020
I use the following to ignore the numba warning without affecting other warnings for now.
scvannost commentedon Feb 8, 2020
This solution works for me!
vasiliskatr commentedon Mar 23, 2021
Thank you for numba!
This warning: "The keyword argument 'parallel=True' was specified but no transformation for parallel execution was possible."
is always occurring only on the 1st execution of the jited function. Every subsequent execution runs smoothly and and several times faster. Is there a way to avoid this warning entirely?
Many computationally-heavy functions are called only once and thus it would be a great improvement if it could be avoided.