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 jobs generate identical chains #1479
Comments
Wow! I bet this is related to this conversation, and clears up a lot. What should behavior be in this situation? It looks like in We have three situations to think about:
In the first and third case, I would expect the behavior you pointed out to occur. I doubt this is ever the intended outcome, and would probably change
|
Wow, that's interesting. I think what needs done now is change |
@ColCarroll I think that change is a good idea. A very interesting observation. |
This would be a definite breaking change (though arguably it would only break on problems like what @aloctavodia observed, which is A Good Thing) I can put together a PR/test tonight. |
@fonnesbeck how do you feel about a breaking change like this? I guess all we'd need to do is to announce it in the documentation and on twitter. |
Great work btw @aloctavodia I love the things you discover :) |
I could have sworn we've seen this before and had it fixed, but I can't remember when. Anyhow, definitely needs fixing. If you break something that gave you the wrong answer, I don't consider that a breaking change. If you are passing along your own random seeds, which is the only way to get a right answer right now, this should not break it. I don't think it requires any announcement or warning. |
Seems odd that this should happen, though because if At any rate, I think just setting the default value to |
@fonnesbeck yeah -- passing your own random seeds or |
In particular, the goal was that
be deterministic. Using |
Ah, right. I knew it used to work. I think its appropriate not to have any expectation of chain seeding (other than expecting them not to be seeded identically) if you do not manually specify your seed to sample. |
That's reasonable -- maybe a warning message that pymc is re-seeding the rngs, and how to ask it not to? |
That's not a bad idea. |
@springcoil I am glad to help. Thank you all guys for the quick fix! |
I am late to the party here, but for the future ... |
Doing
pm.sample(1000, njobs=4)
used to return 4 chains, each one starting from a different point. Now it returns 4 identical chains, unless something likerandom_seed=None
orrandom_seed=[1,2,3,4]
is specified.The text was updated successfully, but these errors were encountered: