Hi,
Is there anyway to suppress the pystan output? It's making my console unmanageable when I need to do 100s of simulations.
E.g.:
STAN OPTIMIZATION COMMAND (LBFGS)
init = user
save_iterations = 1
init_alpha = 0.001
tol_obj = 1e-12
tol_grad = 1e-08
tol_param = 1e-08
tol_rel_obj = 10000
tol_rel_grad = 1e+07
history_size = 5
seed = 608934640
initial log joint probability = -4.96167
Iter log prob ||dx|| ||grad|| alpha alpha0 # evals Notes
92 60.2419 8.15566e-09 502.912 0.6088 0.6088 121
Optimization terminated normally:
Convergence detected: absolute parameter change was below tolerance
Vlad
This is surprisingly challenging. Working on it...
Redirect the output to /dev/null or some file?
This would also be very useful for R. I'm using prophet inside an R Markdown document, and the Stan printout is just not an option. Thanks!
Had the same issue and figured that the output you see comes from calling rstan::optimizing() and rstan::sampling(). Here is a similar issue in RStan
Using results = "hide" in the knitr code chunk options works, for those of you using RMarkdown.
Any solution for python though?
@jimanvlad I just added a decorator to #223 that will suppress the output.
I'm going to close this to merge it with #223. In the latest version of rstan, optimizer output is suppressed by default. Pystan still doesn't have an option to suppress optimizer output, but there is a workaround in #223 to suppress the output with a wrapper function.
Most helpful comment
This is surprisingly challenging. Working on it...