What's the correct way to pass the results of `init_nuts` to `sample`?

Just a quick one to help me decouple initialization from sampling, because pm.sample() does everything all in one

Is it as simple as this? (which seems to work, but I want to confirm)

with mdl:
    initial_points, step = pm.init_nuts(init='auto', chains=4)
    idata = pm.sample(step=step)

There’a a clue in GLM: Mini-batch ADVI on hierarchical regression model — PyMC example gallery and this earlier question Starting NUTS at specific value in pymc 5, but mine is a different use-case. All I want to do is decouple the call so I can debug…

1 Like