stan-dev / pystan2

PyStan, the Python interface to Stan
GNU General Public License v3.0
921 stars 191 forks source link

Importing pystan makes logging level very noisy #745

Closed canyon289 closed 3 years ago

canyon289 commented 3 years ago

Summary:

For some reason importing pystan makes the logging level very noisy for some reason. See Matplotlib logging output between the two cases image

Description:

See above

Reproducible Steps:

import matplotlib
import sys
import matplotlib.pyplot as plt
matplotlib.__version__

fig, ax = plt.subplots()
ax.set_yticklabels([f"$\\mathcal{{N}}$" for i in range(2)], fontsize=16);

import pystan
pystan.__version__
fig, ax = plt.subplots()
ax.set_yticklabels([f"$\\mathcal{{N}}$" for i in range(2)], fontsize=16);

Current Output:

The current output. Knowing what is the current behavior is useful.

Expected Output:

Describe what you expect the output to be. Knowing the correct behavior is also very useful.

PyStan Version:

'2.19.1.1'

Python Version:

3.9.1

Operating System:

Ubuntu 20.04

Extra info, Heres what it looks like in bigger notebook

When Pystan is imported

image

Without pystan import

image

ahartikainen commented 3 years ago

Is this some macos / jupyter specific problem?

What happens if you import pystan at start?

Also see https://pystan.readthedocs.io/en/latest/logging.html

canyon289 commented 3 years ago

Im on linux, it might be jupyter specific though.

If I import pystan then the logging becomes very verbose for both code blocks

canyon289 commented 3 years ago

Also feel free to treat this as low priority and I can come fix later after I finish writing the book chapters