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

Backport PR #2801: Fix scanpy.read_10x_mtx’s gex_only=True mode #2812

Merged
merged 2 commits into from
Jan 16, 2024

fix syntax

99d3acd
Select commit
Loading
Failed to load commit list.
Merged

Backport PR #2801: Fix scanpy.read_10x_mtx’s gex_only=True mode #2812

fix syntax
99d3acd
Select commit
Loading
Failed to load commit list.
Azure Pipelines / scverse.scanpy succeeded Jan 16, 2024 in 12m 1s

Build #20240116.2 had test failures

Details

Tests

  • Failed: 7 (0.17%)
  • Passed: 3,910 (96.21%)
  • Other: 147 (3.62%)
  • Total: 4,064
Code coverage

  • 8299 of 11643 lines covered (71.28%)

Annotations

Check failure on line 1 in scanpy/tests/test_ingest.py::test_representation

See this annotation in the file changed.

@azure-pipelines azure-pipelines / scverse.scanpy

scanpy/tests/test_ingest.py::test_representation

adatas = (AnnData object with n_obs × n_vars = 500 × 765
    obs: 'bulk_labels', 'n_genes', 'percent_mito', 'n_counts', 'S_scor...pca', 'X_umap'
    varm: 'PCs'
    obsp: 'distances', 'connectivities', AnnData object with n_obs × n_vars = 200 × 765)

    def test_representation(adatas):
        adata_ref = adatas[0].copy()
        adata_new = adatas[1].copy()
    
>       ing = sc.tl.Ingest(adata_ref)

scanpy/tests/test_ingest.py:46: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
scanpy/tools/_ingest.py:386: in __init__
    self._init_neighbors(adata, neighbors_key)
scanpy/tools/_ingest.py:352: in _init_neighbors
    self._init_pynndescent(neighbors['distances'])
scanpy/tools/_ingest.py:289: in _init_pynndescent
    self._nnd_idx = NNDescent(
/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/pynndescent/pynndescent_.py:931: in __init__
    self._neighbor_graph = nn_descent(
/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/numba/core/dispatcher.py:468: in _compile_for_args
    error_rewrite(e, 'typing')
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

e = TypingError('Failed in nopython mode pipeline (step: nopython frontend)\nFailed in nopython mode pipeline (step: nopyt...f nn_descent(\n    <source elided>\n    if low_memory:\n        nn_descent_internal_low_memory_parallel(\n        ^\n')
issue_type = 'typing'

    def error_rewrite(e, issue_type):
        """
        Rewrite and raise Exception `e` with help supplied based on the
        specified issue_type.
        """
        if config.SHOW_HELP:
            help_msg = errors.error_extras[issue_type]
            e.patch_message('\n'.join((str(e).rstrip(), help_msg)))
        if config.FULL_TRACEBACKS:
            raise e
        else:
>           raise e.with_traceback(None)
E           numba.core.errors.TypingError: Failed in nopython mode pipeline (step: nopython frontend)
E           Failed in nopython mode pipeline (step: nopython frontend)
E           Failed in nopython mode pipeline (step: nopython frontend)
E           Internal error at <numba.core.typeinfer.CallConstraint object at 0x7f8bfb80c400>.
E           Failed in nopython mode pipeline (step: parfor prelowering)
E           'NoneType' object has no attribute 'name'
E           During: resolving callee type: type(CPUDispatcher(<function apply_graph_updates_low_memory at 0x7f8c0d614d30>))
E           During: typing of call at /opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/pynndescent/pynndescent_.py (228)
E           
E           Enable logging at debug level for details.
E           
E           File "../../../../../opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/pynndescent/pynndescent_.py", line 228:
E           def process_candidates(
E               <source elided>
E           
E                   c += apply_graph_updates_low_memory(current_graph, updates, n_threads)
E                   ^
E           
E           During: resolving callee type: type(CPUDispatcher(<function process_candidates at 0x7f8c0c8d11f0>))
E           During: typing of call at /opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/pynndescent/pynndescent_.py (258)
E           
E           During: resolving callee type: type(CPUDispatcher(<function process_candidates at 0x7f8c0c8d11f0>))
E           During: typing of call at /opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/pynndescent/pynndescent_.py (258)
E           
E           
E           File "../../../../../opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/pynndescent/pynndescent_.py", line 258:
E           def nn_descent_internal_low_memory_parallel(
E               <source elided>
E           
E                   c = process_candidates(
E                   ^
E           
E           During: resolving callee type: type(CPUDispatcher(<functio
Raw output
/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/numba/core/dispatcher.py:409: numba.core.errors.TypingError: Failed in nopython mode pipeline (step: nopython frontend)

Check failure on line 1 in scanpy/tests/test_ingest.py::test_neighbors

See this annotation in the file changed.

@azure-pipelines azure-pipelines / scverse.scanpy

scanpy/tests/test_ingest.py::test_neighbors

adatas = (AnnData object with n_obs × n_vars = 500 × 765
    obs: 'bulk_labels', 'n_genes', 'percent_mito', 'n_counts', 'S_scor...pca', 'X_umap'
    varm: 'PCs'
    obsp: 'distances', 'connectivities', AnnData object with n_obs × n_vars = 200 × 765)

    def test_neighbors(adatas):
        adata_ref = adatas[0].copy()
        adata_new = adatas[1].copy()
    
>       ing = sc.tl.Ingest(adata_ref)

scanpy/tests/test_ingest.py:76: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
scanpy/tools/_ingest.py:386: in __init__
    self._init_neighbors(adata, neighbors_key)
scanpy/tools/_ingest.py:352: in _init_neighbors
    self._init_pynndescent(neighbors['distances'])
scanpy/tools/_ingest.py:289: in _init_pynndescent
    self._nnd_idx = NNDescent(
/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/pynndescent/pynndescent_.py:931: in __init__
    self._neighbor_graph = nn_descent(
/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/numba/core/dispatcher.py:468: in _compile_for_args
    error_rewrite(e, 'typing')
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

e = TypingError('Failed in nopython mode pipeline (step: nopython frontend)\nFailed in nopython mode pipeline (step: nopyt...f nn_descent(\n    <source elided>\n    if low_memory:\n        nn_descent_internal_low_memory_parallel(\n        ^\n')
issue_type = 'typing'

    def error_rewrite(e, issue_type):
        """
        Rewrite and raise Exception `e` with help supplied based on the
        specified issue_type.
        """
        if config.SHOW_HELP:
            help_msg = errors.error_extras[issue_type]
            e.patch_message('\n'.join((str(e).rstrip(), help_msg)))
        if config.FULL_TRACEBACKS:
            raise e
        else:
>           raise e.with_traceback(None)
E           numba.core.errors.TypingError: Failed in nopython mode pipeline (step: nopython frontend)
E           Failed in nopython mode pipeline (step: nopython frontend)
E           Failed in nopython mode pipeline (step: nopython frontend)
E           Internal error at <numba.core.typeinfer.CallConstraint object at 0x7f8bfb80c400>.
E           Failed in nopython mode pipeline (step: parfor prelowering)
E           'NoneType' object has no attribute 'name'
E           During: resolving callee type: type(CPUDispatcher(<function apply_graph_updates_low_memory at 0x7f8c0d614d30>))
E           During: typing of call at /opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/pynndescent/pynndescent_.py (228)
E           
E           Enable logging at debug level for details.
E           
E           File "../../../../../opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/pynndescent/pynndescent_.py", line 228:
E           def process_candidates(
E               <source elided>
E           
E                   c += apply_graph_updates_low_memory(current_graph, updates, n_threads)
E                   ^
E           
E           During: resolving callee type: type(CPUDispatcher(<function process_candidates at 0x7f8c0c8d11f0>))
E           During: typing of call at /opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/pynndescent/pynndescent_.py (258)
E           
E           During: resolving callee type: type(CPUDispatcher(<function process_candidates at 0x7f8c0c8d11f0>))
E           During: typing of call at /opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/pynndescent/pynndescent_.py (258)
E           
E           
E           File "../../../../../opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/pynndescent/pynndescent_.py", line 258:
E           def nn_descent_internal_low_memory_parallel(
E               <source elided>
E           
E                   c = process_candidates(
E                   ^
E           
E           During: resolving callee type: type(CPUDispatcher(<function nn_
Raw output
/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/numba/core/dispatcher.py:409: numba.core.errors.TypingError: Failed in nopython mode pipeline (step: nopython frontend)

Check failure on line 1 in scanpy/tests/test_ingest.py::test_neighbors_defaults[3]

See this annotation in the file changed.

@azure-pipelines azure-pipelines / scverse.scanpy

scanpy/tests/test_ingest.py::test_neighbors_defaults[3]

adatas = (AnnData object with n_obs × n_vars = 500 × 765
    obs: 'bulk_labels', 'n_genes', 'percent_mito', 'n_counts', 'S_scor...pca', 'X_umap'
    varm: 'PCs'
    obsp: 'distances', 'connectivities', AnnData object with n_obs × n_vars = 200 × 765)
n = 3

    @pytest.mark.parametrize('n', [3, 4])
    def test_neighbors_defaults(adatas, n):
        adata_ref = adatas[0].copy()
        adata_new = adatas[1].copy()
    
        sc.pp.neighbors(adata_ref, n_neighbors=n)
    
>       ing = sc.tl.Ingest(adata_ref)

scanpy/tests/test_ingest.py:99: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
scanpy/tools/_ingest.py:386: in __init__
    self._init_neighbors(adata, neighbors_key)
scanpy/tools/_ingest.py:352: in _init_neighbors
    self._init_pynndescent(neighbors['distances'])
scanpy/tools/_ingest.py:289: in _init_pynndescent
    self._nnd_idx = NNDescent(
/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/pynndescent/pynndescent_.py:931: in __init__
    self._neighbor_graph = nn_descent(
/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/numba/core/dispatcher.py:468: in _compile_for_args
    error_rewrite(e, 'typing')
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

e = TypingError('Failed in nopython mode pipeline (step: nopython frontend)\nFailed in nopython mode pipeline (step: nopyt...f nn_descent(\n    <source elided>\n    if low_memory:\n        nn_descent_internal_low_memory_parallel(\n        ^\n')
issue_type = 'typing'

    def error_rewrite(e, issue_type):
        """
        Rewrite and raise Exception `e` with help supplied based on the
        specified issue_type.
        """
        if config.SHOW_HELP:
            help_msg = errors.error_extras[issue_type]
            e.patch_message('\n'.join((str(e).rstrip(), help_msg)))
        if config.FULL_TRACEBACKS:
            raise e
        else:
>           raise e.with_traceback(None)
E           numba.core.errors.TypingError: Failed in nopython mode pipeline (step: nopython frontend)
E           Failed in nopython mode pipeline (step: nopython frontend)
E           Failed in nopython mode pipeline (step: nopython frontend)
E           Internal error at <numba.core.typeinfer.CallConstraint object at 0x7f8bfb80c400>.
E           Failed in nopython mode pipeline (step: parfor prelowering)
E           'NoneType' object has no attribute 'name'
E           During: resolving callee type: type(CPUDispatcher(<function apply_graph_updates_low_memory at 0x7f8c0d614d30>))
E           During: typing of call at /opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/pynndescent/pynndescent_.py (228)
E           
E           Enable logging at debug level for details.
E           
E           File "../../../../../opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/pynndescent/pynndescent_.py", line 228:
E           def process_candidates(
E               <source elided>
E           
E                   c += apply_graph_updates_low_memory(current_graph, updates, n_threads)
E                   ^
E           
E           During: resolving callee type: type(CPUDispatcher(<function process_candidates at 0x7f8c0c8d11f0>))
E           During: typing of call at /opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/pynndescent/pynndescent_.py (258)
E           
E           During: resolving callee type: type(CPUDispatcher(<function process_candidates at 0x7f8c0c8d11f0>))
E           During: typing of call at /opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/pynndescent/pynndescent_.py (258)
E           
E           
E           File "../../../../../opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/pynndescent/pynndescent_.py", line 258:
E           def nn_descent_internal_low_memory_parallel(
E               <source elided>
E           
E                   c = process_candidates
Raw output
/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/numba/core/dispatcher.py:409: numba.core.errors.TypingError: Failed in nopython mode pipeline (step: nopython frontend)

Check failure on line 1 in scanpy/tests/test_ingest.py::test_neighbors_defaults[4]

See this annotation in the file changed.

@azure-pipelines azure-pipelines / scverse.scanpy

scanpy/tests/test_ingest.py::test_neighbors_defaults[4]

adatas = (AnnData object with n_obs × n_vars = 500 × 765
    obs: 'bulk_labels', 'n_genes', 'percent_mito', 'n_counts', 'S_scor...pca', 'X_umap'
    varm: 'PCs'
    obsp: 'distances', 'connectivities', AnnData object with n_obs × n_vars = 200 × 765)
n = 4

    @pytest.mark.parametrize('n', [3, 4])
    def test_neighbors_defaults(adatas, n):
        adata_ref = adatas[0].copy()
        adata_new = adatas[1].copy()
    
        sc.pp.neighbors(adata_ref, n_neighbors=n)
    
>       ing = sc.tl.Ingest(adata_ref)

scanpy/tests/test_ingest.py:99: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
scanpy/tools/_ingest.py:386: in __init__
    self._init_neighbors(adata, neighbors_key)
scanpy/tools/_ingest.py:352: in _init_neighbors
    self._init_pynndescent(neighbors['distances'])
scanpy/tools/_ingest.py:289: in _init_pynndescent
    self._nnd_idx = NNDescent(
/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/pynndescent/pynndescent_.py:931: in __init__
    self._neighbor_graph = nn_descent(
/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/numba/core/dispatcher.py:468: in _compile_for_args
    error_rewrite(e, 'typing')
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

e = TypingError('Failed in nopython mode pipeline (step: nopython frontend)\nFailed in nopython mode pipeline (step: nopyt...f nn_descent(\n    <source elided>\n    if low_memory:\n        nn_descent_internal_low_memory_parallel(\n        ^\n')
issue_type = 'typing'

    def error_rewrite(e, issue_type):
        """
        Rewrite and raise Exception `e` with help supplied based on the
        specified issue_type.
        """
        if config.SHOW_HELP:
            help_msg = errors.error_extras[issue_type]
            e.patch_message('\n'.join((str(e).rstrip(), help_msg)))
        if config.FULL_TRACEBACKS:
            raise e
        else:
>           raise e.with_traceback(None)
E           numba.core.errors.TypingError: Failed in nopython mode pipeline (step: nopython frontend)
E           Failed in nopython mode pipeline (step: nopython frontend)
E           Failed in nopython mode pipeline (step: nopython frontend)
E           Internal error at <numba.core.typeinfer.CallConstraint object at 0x7f8bfb80c400>.
E           Failed in nopython mode pipeline (step: parfor prelowering)
E           'NoneType' object has no attribute 'name'
E           During: resolving callee type: type(CPUDispatcher(<function apply_graph_updates_low_memory at 0x7f8c0d614d30>))
E           During: typing of call at /opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/pynndescent/pynndescent_.py (228)
E           
E           Enable logging at debug level for details.
E           
E           File "../../../../../opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/pynndescent/pynndescent_.py", line 228:
E           def process_candidates(
E               <source elided>
E           
E                   c += apply_graph_updates_low_memory(current_graph, updates, n_threads)
E                   ^
E           
E           During: resolving callee type: type(CPUDispatcher(<function process_candidates at 0x7f8c0c8d11f0>))
E           During: typing of call at /opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/pynndescent/pynndescent_.py (258)
E           
E           During: resolving callee type: type(CPUDispatcher(<function process_candidates at 0x7f8c0c8d11f0>))
E           During: typing of call at /opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/pynndescent/pynndescent_.py (258)
E           
E           
E           File "../../../../../opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/pynndescent/pynndescent_.py", line 258:
E           def nn_descent_internal_low_memory_parallel(
E               <source elided>
E           
E                   c = process_candidates
Raw output
/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/numba/core/dispatcher.py:409: numba.core.errors.TypingError: Failed in nopython mode pipeline (step: nopython frontend)