Skip to content

Do not use global random seeding in SMC sampling #4938

Closed
@ricardoV94

Description

@ricardoV94

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions