So, I thought my above question was stupid, but then I found this:

So, in pseudo-pseudo code but actually actual code, I do this:

```
while fit.no_divergences:
print(f'We have {fit.no_divergences} divergences. Increasing `adapt_delta` from {fit.adapt_delta}.')
fit = fit.resample(
adapt_delta=np.sqrt(fit.adapt_delta)
)
```

where `resample`

takes the original fit, takes the last draws as initialization, recomputes the metric based on the previous samples, and then just restarts with exactly the same arguments except a higher `adapt_delta`

.

My question is, what could go wrong? (Except the loop never terminating).

Edit: Forgot to mention something: Here, resample only runs the final adaptation window to find a step size and then retries to sample.