Getting the error: "numba.errors.TypingError: Failed in nopython mode pipeline (step: nopython frontend)" when running sc.tl.umap with init_pos='paga'
See original GitHub issueHi,
I’m trying to follow the Dahlin18 PAGA tutorial
And in the part where it calls the UMAP function providing it with the PAGA initial points (line 28 in the notebook: sc.tl.umap(adata, init_pos='paga')
), I’m getting this error message:
computing UMAP
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/nr/miniconda3/lib/python3.7/site-packages/scanpy/tools/_umap.py", line 145, in umap
verbose=settings.verbosity > 3,
File "/home/nr/miniconda3/lib/python3.7/site-packages/umap/umap_.py", line 1005, in simplicial_set_embedding
verbose=verbose,
File "/home/nr/miniconda3/lib/python3.7/site-packages/numba/dispatcher.py", line 401, in _compile_for_args
error_rewrite(e, 'typing')
File "/home/nr/miniconda3/lib/python3.7/site-packages/numba/dispatcher.py", line 344, in error_rewrite
reraise(type(e), e, None)
File "/home/nr/miniconda3/lib/python3.7/site-packages/numba/six.py", line 668, in reraise
raise value.with_traceback(tb)
numba.errors.TypingError: Failed in nopython mode pipeline (step: nopython frontend)
Invalid use of type(CPUDispatcher(<function rdist at 0x7f8ffd913050>)) with parameters (array(float64, 1d, C), array(float32, 1d, C))
Known signatures:
* (array(float32, 1d, A), array(float32, 1d, A)) -> float32
* parameterized
[1] During: resolving callee type: type(CPUDispatcher(<function rdist at 0x7f8ffd913050>))
[2] During: typing of call at /home/nr/miniconda3/lib/python3.7/site-packages/umap/umap_.py (795)
File "miniconda3/lib/python3.7/site-packages/umap/umap_.py", line 795:
def optimize_layout(
<source elided>
dist_squared = rdist(current, other)
^
This is not usually a problem with Numba itself but instead often caused by
the use of unsupported features or an issue in resolving types.
To see Python/NumPy features supported by the latest release of Numba visit:
http://numba.pydata.org/numba-doc/latest/reference/pysupported.html
and
http://numba.pydata.org/numba-doc/latest/reference/numpysupported.html
For more information about typing errors and how to debug them visit:
http://numba.pydata.org/numba-doc/latest/user/troubleshoot.html#my-code-doesn-t-compile
If you think your code should work with Numba, please report the error message
and traceback, along with a minimal reproducer at:
https://github.com/numba/numba/issues/new
I saw a relevant issue on the umap package and
even changed line 1138 in umap_.py from embedding
to embedding..astype(np.float32, copy=True)
, but no success.
Any idea?
Thanks!
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (2 by maintainers)
Top Results From Across the Web
"numba.errors.TypingError: Failed in nopython mode pipeline ...
Getting the error: "numba.errors.TypingError: Failed in nopython mode pipeline (step: nopython frontend)" when running sc.tl.umap with init_pos='paga' #948.
Read more >numba.errors.TypingError: Failed in nopython mode pipeline ...
As UMAP uses numba package, I got a problem with resolving types. Here is the error shown. ipdb> trans.transform(X_test.reshape(X_test.shape[0], ...
Read more >Pp.neighbors 'nopython mode pipeline error' - Help - Scanpy
When i try to use it I get an error saying: 'LoweringError: Failed in nopython mode pipeline (step: nopython mode backend)
Read more >How to analyze a 1 million cell data set using Scanpy and ...
Accessing the Parse Biosciences files used in this tutorial. To execute the Harmony integration analysis described below, customer will need to ...
Read more >Numba-Typingerror: Failed In Nopython Mode Pipeline (Step
A step by step guide to get started with data analysis in Python I will be using a dataset from Kaggle called Pima...
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 Free
Top 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
Yes. Within the implementation of the
simplicial_set_embedding
function in the umap_.py file (in my system it is located at:~/miniconda3/lib/python3.7/site-packages/umap/umap_.py
), I type-casted theembedding
objects toastype(np.float32, copy=False)
from within the call to theoptimize_layout
function: lines 1137 and 1138 in umap_.py are thus changed from:embedding,
embedding
to:
embedding.astype(np.float32, copy=False),
embedding.astype(np.float32, copy=False)
Thanks for the info! So lmcinnes/umap#179 needs to be reopened?