How can I terminate pm.sample when a convergence criterion is met (e.g. r_hat < 1.05)

have met the same issue, the example code doesn’t work.