pymc.step_methods.CompoundStep.fork#

CompoundStep.fork(rng)[source]#

Fork every child step for a new chain/thread.

Propagates NotImplementedError if any child cannot fork, so the caller falls back to multiprocessing for the whole compound step rather than forking only some children.

Children are not seeded from rng here; _iter_sample calls set_rng on the compound step once per chain, which spawns and distributes an independent generator to each child. Seeding during fork as well would consume the chain’s RNG twice (see BlockedStep.fork).