-
Notifications
You must be signed in to change notification settings - Fork 43
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
Multi-threading support for MCMC samplers #39
Conversation
…bject to orbitize's Sampler object (as part of initialization) emcee v3.0 will no longer support the PT Sampler, using ptemcee instead (designed to be drop-in replacement) this commit still has some issues...not parallel yet;
…rallelization (still failing)
…C and PTMCMC classes to allow for parallelization. Added block to try to do the same for python3, but it doesn't seem to work yet
…objects - this allows paralellization with DFM's emcee - run_sampler now returns emcee.sampler object (for both orbitize.sampler MCMC classes) - test_mcmc.py tests passing in python 2 and 3
Pull Request Test Coverage Report for Build 244
💛 - Coveralls |
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.
Looks good to me!
We could in the future try importing either emcee.PTSampler or ptemcee and see which one imports successfully and use the one that does. I believe they have the example same interface.
For the affine invariant sampler to be effective, I think it needs to either only run on fits where we limit \omega and \Omega to be < 180 (i.e., posterior is unimodal) or run one sampler for each mode.
Okay, the new version of emcee actually deletes their PTSampler and instead checks if you have ptemcee installed and if so, imports that instead. |
Thanks, @henry-ngo! Milestone! |
sampler object's initialization can specify
nthreads
for parallelization.Since
emcee
will remove their PT sampler in the next release, I've added the Ensemble Sampler fromemcee
as an alternative (a good replacement might beptemcee
)Addresses Issue #30