Summary
I would like to suppress PyStan (2.19) loggings from the function sampling
in Jupyter Notebook since I will use it as a Jupyter Book.
What was the process?
I started a new conda
environment (conda create
) and installed numpy, pandas, seaborn, matplotlib, ipykernel, arviz, and pystan (conda install
), except pystan that I used the version (conda install pystan=2
). After that I installed the environment as a kernel in Jupyter. However, I couldn’t compile stan files, and I solved this problem including the parameter extra_compile_args=["-w"]
in StanModel class. I think this should be sufficient to reproduce this situation.
Additional Info
- Operating System: Linux Ubuntu 21.04
- Python Version: 3.9.7
- PyStan Version: 2.19.1.1
- gcc-version: 10.3.0
What I have already tried?
- I tried to use the logging library, but I wasn’t able to find the correct type of logging.
- This file: Silence C++ stdout (stderr still works) · GitHub
- Use the parameter refresh = 0.
How the logging looks like?
Gradient evaluation took 9e-06 seconds
Gradient evaluation took 1.2e-05 seconds
1000 transitions using 10 leapfrog steps per transition would take 0.09 seconds.
Adjust your expectations accordingly!
1000 transitions using 10 leapfrog steps per transition would take 0.12 seconds.
Gradient evaluation took 8e-06 seconds
I would appreciate some help. Thanks!