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
Parallel processing using Joblib #973
Conversation
@@ -124,37 +124,26 @@ def sample(draws, step=None, start=None, trace=None, chain=0, njobs=1, tune=None | |||
step = assign_step_methods(model, step) | |||
|
|||
if njobs is None: | |||
import multiprocessing | |||
njobs = max(mp.cpu_count() - 2, 1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if we should just set the default to 2. That way everyone gets 2 chains unless they say otherwise, which allows Gelman-Rubin to be calculated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good to me. But should make sure it's stable across platforms first.
Add Binary Gibbs Metropolis sampler for mixture models.
Improved handling of discrete variables by metropolis step method
COSMIT PEP-8-ted ``pymc3.models``
@fonnesbeck Not sure what the status here is but it looks good to me. I suppose it doesn't affect the recursion problem but simplifies the code? |
Was just awaiting review. Will rebase and merge. |
Parallel processing using Joblib
I simply get a segmentation fault (core dumped) now when using njobs>1 for a complex model. No trace-back nothing. For simple models it works fine! |
Implemented Joblib to control parallel processing, rather than
multiprocessing
. Greatly simplifiessample
as a side-benefit. Closes #879