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

Stop using multiprocessing for fitting dispersion models earlier #142

Open
le-ander opened this issue Mar 30, 2022 · 1 comment
Open

Stop using multiprocessing for fitting dispersion models earlier #142

le-ander opened this issue Mar 30, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@le-ander
Copy link
Member

le-ander commented Mar 30, 2022

From experience, I can say that the multiprocessing overhead when fitting dispersion models seems to be a lot larger than the code is currently written for.

ie. fitting the last 50 or so models still takes a long time and as soon as multiprocessing is switched off for the last models, things become a lot faster. maybe multiprocessing could be only used when there are more than 10x as many genes left than processors here:

if nproc > 1 and len(idx_update) > nproc:

So something like:
if nproc > 1 and len(idx_update) > 10 * nproc:

@le-ander le-ander added the enhancement New feature or request label Mar 30, 2022
@le-ander
Copy link
Member Author

To provide some numbers: on 8 cores the last iteration where multiprocessing is used (fitting like 9 or 10 genes) takes 16s, the next iteration (no multiprocessing, so 7-8 genes) takes 2s

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

No branches or pull requests

1 participant