Skip to content

[QST] Lazy loading + rsc #521

@emdann

Description

@emdann

From this tutorial I understand I should be able to lazily load my anndata object and perform processing with rsc.

Then why does this throw an error?

adata_ntc = anndata.experimental.read_lazy('object.h5ad')
rsc.get.anndata_to_GPU(adata_ntc)
rsc.pp.highly_variable_genes(adata_ntc, n_top_genes=5000, flavor='seurat_v3')
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
Cell In[13], line 1
----> 1 _check_gpu_X(adata_ntc.X)

File ~/miniforge3/envs/rapids_singlecell/lib/python3.11/site-packages/rapids_singlecell/preprocessing/_utils.py:300, in _check_gpu_X(X, require_cf, allow_dask, allow_csc)
    298         return _check_gpu_X(X._meta, allow_csc=False)
    299     else:
--> 300         raise TypeError(
    301             "The input is a DaskArray. "
    302             "Rapids-singlecell doesn't support DaskArray in this function, "
    303             "so your input must be a CuPy ndarray or a CuPy sparse matrix. "
    304         )
    305 elif isinstance(X, cp.ndarray):
    306     return True

TypeError: The input is a DaskArray. Rapids-singlecell doesn't support DaskArray in this function, so your input must be a CuPy ndarray or a CuPy sparse matrix.

(Using rapids-singlecell-0.13.4)

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions