Skip to content

Metropolis chain tuning is differs between single- and multiprocessing #3733

Closed
@michaelosthege

Description

@michaelosthege

(split from #3731)

Observations

When Metropolis is used with cores > 1 and chains > 1, all chains are independently tuned.

With cores=1 however, Metropolis initializes the 2nd chain with the scaling from the first. It is still tuned, but in the end it's a different between sequential single-process and parallelized multiprocess sampling.

Cause

For Metropolis, the stepper is re-used and re-tuned, but no reset happens.

https://github.com/pymc-devs/pymc3/blob/dc9fd7251b34e9851308e91d622513ebe648f49e/pymc3/sampling.py#L711-L716

Possible Solutions

  • re-setting the tuning parameter before continuing with the next chain
  • ...other ideas?

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