alevax / pyviper

Porting of Protein Activity and Pathway Inference to single cell and Python.
MIT License
10 stars 0 forks source link

Reset batch sizes #50

Closed alexanderlewis99 closed 10 months ago

alexanderlewis99 commented 11 months ago

Options for making it so that each core gets exactly the same number of samples, such as follows:

First determine how many cores to use based on n_samples and batch_size: n_cores = round_up(n_samples/batch_size)

Then readjust the batch_size so it's (almost) exactly equal across the cores: batch_size = n_samples/n_cores

Example: 10100 cells, 10K sample size, 2 cores ==> batch_size = 10100/2 = 5050 cells.

alexanderlewis99 commented 10 months ago

Solved by commit 9f7ddd8