Skip to content

Do not use global random seeding in SMC sampling #4938

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

Closed
ricardoV94 opened this issue Aug 17, 2021 · 0 comments · Fixed by #5131
Closed

Do not use global random seeding in SMC sampling #4938

ricardoV94 opened this issue Aug 17, 2021 · 0 comments · Fixed by #5131
Labels

Comments

@ricardoV94
Copy link
Member

ricardoV94 commented Aug 17, 2021

We are creating new random seeds in sample_smc here:

https://github.com/pymc-devs/pymc3/blob/2257c34ccf59a5e500c7faf1ca3d480244e7848f/pymc3/smc/sample_smc.py#L207-L216

And then setting a global seed state in the SMC kernel here:
https://github.com/pymc-devs/pymc3/blob/2257c34ccf59a5e500c7faf1ca3d480244e7848f/pymc3/smc/smc.py#L155-L156

Instead we should propagate the rng RandomStream/Generator to the methods that take random draws and use it directly

@ricardoV94 ricardoV94 changed the title Make use of rng in SMC sampling Do not use global random seeding in SMC sampling Aug 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant