I`m using Prophet (Time series library by Facebook) and it makes a lot of output. Something like this: Prophet output
I`m already silent some output like this:
@contextmanager
def suppress_stdout():
with open(os.devnull, "w") as devnull:
old_stdout = sys.stdout
sys.stdout = devnull
try:
yield
finally:
sys.stdout = old_stdout
But it doesn't silent all types of output, how I can silent all types?
The problem here is the Prophet several loggers, which you can silent with:
import logging
logging.getLogger("prophet").setLevel(logging.ERROR)
logging.getLogger("cmdstanpy").setLevel(logging.ERROR)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With