# BoundsError on Bayesian ODE model with Turing

**URL:** <https://discourse.julialang.org/t/boundserror-on-bayesian-ode-model-with-turing/74147>\
**Category:** Probabilistic Programming\
**Tags:** diffeq, ode, turing\
**Created:** [January 6, 2022, 2:51pm UTC](https://discourse.julialang.org/t/boundserror-on-bayesian-ode-model-with-turing/74147 "2022-01-06T14:51:18Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![ChrisRackauckas](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/chrisrackauckas/32/77_2.png) [@ChrisRackauckas](https://discourse.julialang.org/u/ChrisRackauckas)\
**Post date:** [January 8, 2022, 12:09am UTC](https://discourse.julialang.org/t/boundserror-on-bayesian-ode-model-with-turing/74147/5 "2022-01-08T00:09:41Z")

</div>

Well the warning says that it was unstable so it exited, which means it won’t save every point in `ts` and you need to check `if sol.retcode == :Success` like the tutorials show. I don’t see that done here, so I would presume that’s where your issue comes from.

Why is it unstable? See [PSA: How to help yourself debug differential equation solving issues](https://discourse.julialang.org/t/psa-how-to-help-yourself-debug-differential-equation-solving-issues/62489) . If it’s unstable at the first set of parameters, then it’s likely there’s an issue in the definition of the ODE and you should re-check that. If it’s only after the optimization has started, then maybe the parameters turn stiff while optimizing, in which case you need to use a different solver, or there are just some parameters where the ODE is unstable, which means you need to check and reject.

---

_[View the full topic](https://discourse.julialang.org/t/boundserror-on-bayesian-ode-model-with-turing/74147)._
