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

Fix for _validate_palette for old numpy versions, prepare 1.9.8 hotfix release #2832

Merged
merged 2 commits into from
Jan 26, 2024

prepare 1.9.8

11e93fe
Select commit
Failed to load commit list.
Merged

Fix for _validate_palette for old numpy versions, prepare 1.9.8 hotfix release #2832

prepare 1.9.8
11e93fe
Select commit
Failed to load commit list.
Azure Pipelines / scverse.scanpy succeeded Jan 26, 2024 in 13m 56s

Build #20240126.5 had test failures

Details

Tests

  • Failed: 9 (0.16%)
  • Passed: 5,364 (94.44%)
  • Other: 307 (5.40%)
  • Total: 5,680
Code coverage

  • 9013 of 12391 lines covered (72.74%)

Annotations

Check failure on line 1 in scanpy/tests/test_neighbors.py::test_distances_all[pynndescent]

See this annotation in the file changed.

@azure-pipelines azure-pipelines / scverse.scanpy

scanpy/tests/test_neighbors.py::test_distances_all[pynndescent]

neigh = <scanpy.neighbors.Neighbors object at 0x7f454b77b050>
transformer = 'pynndescent', knn = True

    @pytest.mark.parametrize(
        ("transformer", "knn"),
        [
            # knn=False trivially returns all distances
            pytest.param(None, False, id="knn=False"),
            # pynndescent returns all distances when data is so small
            pytest.param("pynndescent", True, id="pynndescent"),
            # Explicit brute force also returns all distances
            pytest.param(
                KNeighborsTransformer(n_neighbors=n_neighbors, algorithm="brute"),
                True,
                id="sklearn",
            ),
        ],
    )
    def test_distances_all(neigh: Neighbors, transformer, knn):
>       neigh.compute_neighbors(
            n_neighbors, transformer=transformer, method="gauss", knn=knn
        )

scanpy/tests/test_neighbors.py:157: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
scanpy/neighbors/__init__.py:552: in compute_neighbors
    self._distances = transformer.fit_transform(X)
/opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/site-packages/sklearn/utils/_set_output.py:273: in wrapped
    data_to_wrap = f(self, X, *args, **kwargs)
/opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/site-packages/pynndescent/pynndescent_.py:2205: in fit_transform
    self.fit(X, compress_index=False)
/opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/site-packages/pynndescent/pynndescent_.py:2123: in fit
    self.index_ = NNDescent(
/opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/site-packages/pynndescent/pynndescent_.py:931: in __init__
    self._neighbor_graph = nn_descent(
/opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/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 0x7f45517b95d0>.
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 0x7f456464a8e0>))
E           During: typing of call at /opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/site-packages/pynndescent/pynndescent_.py (228)
E           
E           Enable logging at debug level for details.
E           
E           File "../../../../../opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/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 0x7f4563f225c0>))
E           During: typing of call at /opt/hostedtoolcache/Python/3.11.7/x6
Raw output
/opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/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/preprocessing/_simple.py::scanpy.preprocessing._simple.filter_cells

See this annotation in the file changed.

@azure-pipelines azure-pipelines / scverse.scanpy

scanpy/preprocessing/_simple.py::scanpy.preprocessing._simple.filter_cells

081         Boolean index mask that does filtering. `True` means that the
082         cell is kept. `False` means the cell is removed.
083     number_per_cell
084         Depending on what was thresholded (`counts` or `genes`),
085         the array stores `n_counts` or `n_cells` per gene.
086 
087     Examples
088     --------
089     >>> import scanpy as sc
090     >>> adata = sc.datasets.krumsiek11()
UNEXPECTED EXCEPTION: UserWarning('Observation names are not unique. To make them unique, call `.obs_names_make_unique`.')
Traceback (most recent call last):
  File "/opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/doctest.py", line 1353, in __run
    exec(compile(example.source, filename, "single",
  File "<doctest scanpy.preprocessing._simple.filter_cells[1]>", line 1, in <module>
  File "/home/vsts/work/1/s/scanpy/datasets/_datasets.py", line 109, in krumsiek11
    adata = read(filename, first_column_names=True)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/site-packages/legacy_api_wrap/__init__.py", line 80, in fn_compatible
    return fn(*args_all, **kw)
           ^^^^^^^^^^^^^^^^^^^
  File "/home/vsts/work/1/s/scanpy/readwrite.py", line 124, in read
    return _read(
           ^^^^^^
  File "/home/vsts/work/1/s/scanpy/readwrite.py", line 801, in _read
    adata = read_text(filename, delimiter, first_column_names)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/site-packages/anndata/_io/read.py", line 360, in read_text
    return _read_text(f, delimiter, first_column_names, dtype)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/site-packages/anndata/_io/read.py", line 471, in _read_text
    return AnnData(
           ^^^^^^^^
  File "/opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/site-packages/anndata/_core/anndata.py", line 362, in __init__
    self._init_as_actual(
  File "/opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/site-packages/anndata/_core/anndata.py", line 574, in _init_as_actual
    self._check_uniqueness()
  File "/opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/site-packages/anndata/_core/anndata.py", line 1906, in _check_uniqueness
    utils.warn_names_duplicates("obs")
  File "/opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/site-packages/anndata/utils.py", line 275, in warn_names_duplicates
    warnings.warn(
UserWarning: Observation names are not unique. To make them unique, call `.obs_names_make_unique`.
/home/vsts/work/1/s/scanpy/preprocessing/_simple.py:90: UnexpectedException
Raw output
081         Boolean index mask that does filtering

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:424: in __init__
    self._init_neighbors(adata, neighbors_key)
scanpy/tools/_ingest.py:388: in _init_neighbors
    self._init_pynndescent(neighbors["distances"])
scanpy/tools/_ingest.py:325: in _init_pynndescent
    self._nnd_idx = NNDescent(
/opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/site-packages/pynndescent/pynndescent_.py:931: in __init__
    self._neighbor_graph = nn_descent(
/opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/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 0x7f45517b95d0>.
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 0x7f456464a8e0>))
E           During: typing of call at /opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/site-packages/pynndescent/pynndescent_.py (228)
E           
E           Enable logging at debug level for details.
E           
E           File "../../../../../opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/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 0x7f4563f225c0>))
E           During: typing of call at /opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/site-packages/pynndescent/pynndescent_.py (258)
E           
E           During: resolving callee type: type(CPUDispatcher(<function process_candidates at 0x7f4563f225c0>))
E           During: typing of call at /opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/site-packages/pynndescent/pynndescent_.py (258)
E           
E           
E           File "../../../../../opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/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(<funct
Raw output
/opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/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_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:424: in __init__
    self._init_neighbors(adata, neighbors_key)
scanpy/tools/_ingest.py:388: in _init_neighbors
    self._init_pynndescent(neighbors["distances"])
scanpy/tools/_ingest.py:325: in _init_pynndescent
    self._nnd_idx = NNDescent(
/opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/site-packages/pynndescent/pynndescent_.py:931: in __init__
    self._neighbor_graph = nn_descent(
/opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/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 0x7f45517b95d0>.
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 0x7f456464a8e0>))
E           During: typing of call at /opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/site-packages/pynndescent/pynndescent_.py (228)
E           
E           Enable logging at debug level for details.
E           
E           File "../../../../../opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/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 0x7f4563f225c0>))
E           During: typing of call at /opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/site-packages/pynndescent/pynndescent_.py (258)
E           
E           During: resolving callee type: type(CPUDispatcher(<function process_candidates at 0x7f4563f225c0>))
E           During: typing of call at /opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/site-packages/pynndescent/pynndescent_.py (258)
E           
E           
E           File "../../../../../opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/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(<
Raw output
/opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/site-packages/numba/core/dispatcher.py:409: numba.core.errors.TypingError: Failed in nopython mode pipeline (step: nopython frontend)