pymc icon indicating copy to clipboard operation
pymc copied to clipboard

ENH: progressbar=False should silence all sampling output

Open fonnesbeck opened this issue 9 months ago • 3 comments

Turning off the progress bar via progressbar=False does remove the progress bar, but other sampling-related initialization output is still printed. This results in a lot of output when sampling is performed in a loop:

Initializing NUTS using jitter+adapt_diag...
Multiprocess sampling (4 chains in 4 jobs)
NUTS: [phi, kappa, theta_raw]
Sampling 4 chains for 1_000 tune and 1_000 draw iterations (4_000 + 4_000 draws total) took 1 seconds.
Sampling: [hits]
Initializing NUTS using jitter+adapt_diag...
Multiprocess sampling (4 chains in 4 jobs)
NUTS: [phi, kappa, theta_raw]
Sampling 4 chains for 1_000 tune and 1_000 draw iterations (4_000 + 4_000 draws total) took 1 seconds.
Sampling: [hits]
Initializing NUTS using jitter+adapt_diag...
Multiprocess sampling (4 chains in 4 jobs)
NUTS: [phi, kappa, theta_raw]
Sampling 4 chains for 1_000 tune and 1_000 draw iterations (4_000 + 4_000 draws total) took 1 seconds.
Sampling: [hits]
Initializing NUTS using jitter+adapt_diag...
Multiprocess sampling (4 chains in 4 jobs)
NUTS: [phi, kappa, theta_raw]
Sampling 4 chains for 1_000 tune and 1_000 draw iterations (4_000 + 4_000 draws total) took 1 seconds.
Sampling: [hits]

setting progressbar=False should either silence all output, or an additional argument should be added in order to do so.

fonnesbeck avatar Feb 17 '25 19:02 fonnesbeck

That's using logs, so you can set the pymc logger to debug

ricardoV94 avatar Feb 17 '25 20:02 ricardoV94

working on this!

rchen-05 avatar Feb 26 '25 16:02 rchen-05

working on this!

I would say this issue still needs consensus

ricardoV94 avatar Feb 27 '25 10:02 ricardoV94