You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Remove the deprecated threads argument passed in emcee and add parallel support with multiprocessing.
Fix inference tests to account for inference changes
Add two emcee benchmarks: series and paralle
Add example for running a biocircuit model inference with parallel support
One additional (unrelated but important) minor change: specify versions for scipy and numpy in requirements and pyproject. Numpy version greater than 2.0 breaks the installation (to be fixed later).
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Did you try this and was it any faster? In the past I tried some amount of parallelization and found that on Linux boxes at least, Pool slowed things down (I think because numpy operations were being done in parallel so the OS started fighting for threads).
Yes, the script emcee_parallel.py runs ~10x faster than emcee_series.py on my laptop CPU with 20 cores. The key is that this is an artificially slowed down likelihood function where it 'sleeps' for a few seconds in each iteration. For simple likelihood functions, the overhead with setting up parallel ends up slowing it down, as you suggested. So, parallelization only helps for complex likelihoods.
For the real example parallel_bioscrape_inference.py with 1 Hill function and identifying 3 params, I saw a 3x improvement on the HPC.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes:
Remove the deprecated threads argument passed in emcee and add parallel support with multiprocessing.
Fix inference tests to account for inference changes
Add two emcee benchmarks: series and paralle
Add example for running a biocircuit model inference with parallel support
One additional (unrelated but important) minor change: specify versions for scipy and numpy in requirements and pyproject. Numpy version greater than 2.0 breaks the installation (to be fixed later).