You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Yeah, this is an issue where the first time we call the logger we override whatever level it is at the moment (one of several things we're doing with the logging module which are not "best practices"):
warning: These should probably be replaced with warnings.warn debug: These could just stay as they are I think info: These are the difficult ones, where we currently set up the logger to always show them. If we really want them to be printed by default, we should probably just use print, rather than setting a default log handler on the user's behalf
Summary:
I set the logger level to
WARNING
before compiling and running a model, but I still seeINFO
level warning messages.Description:
Here's a simple reproducible example consisting of a Stan program and a Python script that can go in the same directory and run as shown below.
binomial-rng.stan
:bug.py
The same error arises if you set
logging.ERROR
instead oflogging.WARNING
.@WardBrian suggested the problem might be that there are several loggers being used by CmdStanPy, but only some of them are getting their level set.
Context
I would like to silence all the
DEBUG
andINFO
level messages in the context of constructing a quarto tutorial.Current Version:
The text was updated successfully, but these errors were encountered: