Teichlab / celltypist

A tool for semi-automatic cell type classification
https://www.celltypist.org/
MIT License
284 stars 45 forks source link

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

Closed zqxiao2001 closed 7 months ago

zqxiao2001 commented 11 months ago

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

ChuanXu1 commented 11 months ago

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

ChuanXu1 commented 7 months ago

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