BayraktarLab / cell2location

Comprehensive mapping of tissue cell architecture via integrated single cell and spatial transcriptomics (cell2location model)
https://cell2location.readthedocs.io/en/latest/
Apache License 2.0
321 stars 58 forks source link

Regarding memory required for the first tutorial of cell2location #360

Open sudeepthi5 opened 6 months ago

sudeepthi5 commented 6 months ago

Please use the template below to post a question to https://discourse.scverse.org/c/ecosytem/cell2location/.

Problem

I am trying to run the example in the following page: https://cell2location.readthedocs.io/en/latest/notebooks/cell2location_tutorial.html#Loading-packages

I used the following to request my node: srun --ntasks-per-node=4 --cpus-per-task=4 --mem=32000 --time=12:00:00 --partition=amperenodes --job-name=cell2location --gres=gpu:2

So in the training step I am getting 221/250, instead of training complete, and always I am getting error saying 'use_gpu' command is unrecognized. I would like to request you to provide memory requirement details for tutorial. I will provide any other information if required, can you please help me with this, Thank you.

vitkl commented 5 months ago

Please make sure that you have installed the latest and compatible versions of packages and used the corresponding options (latest version doesn't have 'use_gpu' argument).

The tutorial can run on Google Colab with 12GB RAM given the same data. If you have larger data - you need more RAM.

Cell2location also doesn't use multiple GPUs (--gres=gpu:2) so unless you are starting two processes manually, you can request only one GPU.

There is a bug in the latest GitHub version that results in data being recorded during posterior sampling - resulting in huge RAM use. I am working on fixing this issue - however for now, you can use use_quantiles option of the posterior sampling and exclude_vars to exclude 'data_target' (if it exists).

sudeepthi5 commented 5 months ago

I will work on the recommended options. Thank you.