-
-
Notifications
You must be signed in to change notification settings - Fork 109
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve ODE max_num_steps parameter documentation #283
Comments
Yeah so that change is here: So instead of throwing an error that stops the program, it now throws an error that is recoverable (and then whatever stage errors there will try to recover however it recovers) |
Ok, so I didn't realize that it's possible to recover after an error. Anyway, I would like to understand what the rules are how to recover. |
I'd like to know that too. In particular, why we only catch "TOO_MUCH_WORK" flag(there's many other error flags and this one is not even the one I encounter most)? And why this change was made in variadic ODE PR? Does "flag -1" affect the variadic interface? I can't think of any reason. @bbbales2 @wds15 |
Yeah so you mean catching other flags and making the error messages here more informative? I'd like that for sure.
This change was separate from the variadic ODEs I think: stan-dev/math#1891, or is there a different thing? |
@wds15 made comment that the improved error message was made in variadic PR. I wonder why there. |
Oh. I forget what those were, but it doesn't seem impossible we improved some but not all. More improvement good though, especially in terms of getting informative ODE errors. |
Summary:
The
max_num_steps
parameter for ODE solvers and how to set it could be explained more exactly.Description:
Documentation (Section 13.6) says "… and
max_num_steps
specifies the maximum number of steps the solver will take between output time points before throwing an error" and “The maximum number of steps can be used to stop a runaway simulation.”at least during warmup. If
max_num_steps
is reached during sampling, then it seems to be marked as a divergence, and sometimes if I set max_num_steps to a ridiculously low value, I can getWarning: Chain 4 finished unexpectedly!
.In general, this is confusing and I would really like know what actually happens if
max_num_steps
is reached, and does it depend on whether the chain is doing warmup or sampling. Or in what case does it just reject and try a new proposal, and when does it actually stop a chain and when mark it as divergence.In some earlier version of Stan, an error was actually thrown if
max_num_steps
was reached when trying to compute log probability for the initial parameter values, but I think @bbbales2 told me that it has now changed and instead a new initial point is drawn?Additional Information:
See my Discourse post .
Current Version:
v2.25
The text was updated successfully, but these errors were encountered: