Closed
Description
Getting a lot of The chain reached the maximum tree depth. Increase max_treedepth, increase target_accept or reparameterize.
and found the bug below:
Since self._reached_max_treedepth
is a non-negative integer this line will be true with 1 max_treedepth.
Changing it to something like if self._reached_max_treedepth/nsample > 0.05:
should work, but I think the nsample information is not available? cc @aseyboldt