How to suppress pink message when sampling posterior predictive?

In PyMC v4.2, the progress bar for sample_posterior_predictive() can be suppressed with progressbar=False. But that still leaves an annoying pink message about the variable names sampled:


Is there a way to suppress that as well?

We are just using Python default logging for those, should be easy to suppress… (let me find a stackoverflow)


I’ve looked into this before. Many of the options on stackoverflow and else where to suppress the pink messages just don’t seem to work with pymc4.

Is the message the result of a ‘logging’ or a ‘warning’ within the pymc framework? Or some other method?

1 Like

I’ve been using something like the following:

import logging
logger = logging.getLogger("pymc")

Just tried it, it worked for me. For some reason I was using ERROR, not WARNING.

WARNING works :+1:

1 Like