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

scvi tools train with multi gpus #2726

Open
shanzha9 opened this issue Apr 12, 2024 · 2 comments
Open

scvi tools train with multi gpus #2726

shanzha9 opened this issue Apr 12, 2024 · 2 comments
Labels

Comments

@shanzha9
Copy link

Hi, developers,

The datasets used in my study consisting of 2.6 M cells, so it will take a week to train. I wonder if scvi tools support multi gpus train and if there is an official tutorial.

Thank you!

@shanzha9 shanzha9 added the bug label Apr 12, 2024
@canergen
Copy link
Contributor

There is multi-GPU support. However, your calculation looks vastly off and I don't think your dataset is large enough to benefit largely from multi-GPU. E.g. on the human CELLXGENE census dataset of 35 million cells, training for 100 epochs took less than 2 days (we actually had strikingly similar results after a couple of hours and 20 epochs). I would recommend increasing batch_size to 1024 (time scales pretty linearly with batch size) and reducing train epochs to 50 (it's what I am usually using) and you should be able to train it in 2 hours. Let me know if it takes more than 8 hours (installation might be wrong or your object is not correctly formatted).

@shanzha9
Copy link
Author

@canergen Hi, thanks for your reply.

Could you please link the official multi gpus tutorial. The data to be train is raw counts. I set

scvi.settings.dl_num_workers = 30 scvi.settings.num_threads = 30 scvi.settings.batch_size = 2048

but, the %cpu only under 20% per process. There may somethingwrong with dataloader?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants