-
-
Notifications
You must be signed in to change notification settings - Fork 69
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
cmdstanpy 1.0.2 potentially logging warnings too often? #584
Comments
These were introduced in #577. The current threshold is any of them being nonzero will lead to the warning you see
Yes, these are runtime warnings generated by Stan, unrelated to the above. Most likely they are happening for your model during adaptation and then they go away Previously we only printed them if the Stan model exited with a nonzero exit code, however there are certain situations (mainly in the |
agreed - warnings might be too strong for iterations at max treedepth. the problem is this: we don't have enough information in the output to distinguish between whether or not NUTS hit the "U-turn" at that depth. that is, if you have an iteration at less than max-treedepth which doesn't hit a divergence, then you know that the sampler went as far as it could, but if you have an iteration at maxtreedepth, then you don't know what's going on, and the only way to figure that out would be to up the treedepth by 1 and see if the warnings go away - if that's the case, don't worry, but that's a very slow, inefficient way to do things. thanks for bringing this up, and I'm totally open to suggestions as to what to do under the current regime. this been discussed a number of times on Discourse and in various issues and meetings - e.g., https://discourse.mc-stan.org/t/divergence-vs-hitting-max-treedepth/9399 |
We could set a configurable threshold for the treedepth and convergences if we didn't mind adding even more arguments to |
argument could be a dict - : diagnostics_thresholds |
Revisiting this: it also seems reasonable to me to turn a lot of our calls to |
Summary
I'm wondering if this change in 1.0.2:
leads to unnecessary warnings.
Description:
After running an MCMC, this is the output of
.diagnose()
:Overall it seems like the sampling was successful. However:
cmdstanpy
logged a warning at the end of the sampling:I'm wondering what the thresholds are for logging the non-convergence warning and whether they're too loose?
It seems to be related to a type check of the stan program? I see this warning every time we do MCMC sampling now, even if overall the sampling procedure has no issues. Not sure where it's coming from -- ideally if it doesn't cause any sampling issues we wouldn't show it (in my opinion), but keen to get your thoughts.
In
cmdstanpy==1.0.1
, neither of these warnings were raised.Thank you!!!
To reproduce, in case you need to:
Current Version:
cmdstanpy==1.0.2
The text was updated successfully, but these errors were encountered: