Teichlab/celltypist

Unable to allocate xxx GiB for an array with shape and data type float64

zqxiao2001 opened this issue ยท 2 comments

how can I deal with the memory allocation problem?

my code is the following:

predictions_high = celltypist.annotatea(
    adata_celltypist, model = model_high, majority_voting=True
)

the track:
๐Ÿ”ฌ Input data has 10763 cells and 20848 genes
๐Ÿ”— Matching reference genes in the model
๐Ÿงฌ 5645 features used for prediction
โš–๏ธ Scaling input data
๐Ÿ–‹๏ธ Predicting labels
โœ… Prediction done!
๐Ÿ‘€ Detected a neighborhood graph in the input object, will run over-clustering on the basis of it
โ›“๏ธ Over-clustering input data with resolution set to 10

The error reports

MemoryError: Unable to allocate 1.67 GiB for an array with shape (224387024,) and data type float64
Output is truncated.

Thanks

@zqxiao2001, I believe this is a memory issue. You can allocate more RAM or skip the majority voting step (majority_voting = False)

Will close the issue. Please reopen it if you have further questions.