-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Distributed draws evenly among chains by default #2743
Conversation
I like this -- right now, asking for 1000 samples with One corner case is that |
Is this change really necessary? The current behaviour is similar to Stan, which might help minimize the mental switch for ppl working with both or changing from Stan to PyMC3. |
I guess whether we want to distribute the draws or not depends a bit on how you interpret a call like A couple of arguments either way:
Overall, I like the current behaviour more... |
I think the critical distinction is that when you ask for It’s true you end up with a lot of tuning with multiple chains, but I don’t think it’s a huge issue given how few tuning steps are needed for most models. I would imagine 2 or 4 chains is what most folks end up using most of the time. At the end of the day, I think most users just want a certain number of samples, and aren't necessarily concerned with how they got there. All we are using parallel chains for is to calculate diagnostics and to improve the efficiency of sampling. |
How do we want to proceed here? One option is to revert to sampling from one core by default, so that asking for |
If we are going forward with this change, we should increase the default number of draws. |
I'm in favor of merging. If I think about how many samples I want I don't think about the number of chains. We also had the occasional question why multiprocessing wasn't faster, so this would be less confusing in this regard as well. |
This PR is obsolete now; closing. |
This addresses the issue in #2739 where the number of samples drawn does not reflect what was requested. Draws are now evenly distributed among chains. Now, the following occurs, as expected:
I also removed the sampler warning for chains with <500 samples. If you ask for fewer than 500 samples, you should receive them without generating a warning.