BUG: Progressbar does not update on streamed `stdout`
Describe the issue:
I'm running pymc in a condor HTC environment, where my models are sampled on compute nodes and the output is streamed or copied back to the host.
Without any options to checkpoint sampling with pymc, I want a way to check the status of the sampling even though I don't have access to stdout on the compute nodes.
Currently, we only pass refresh=True on the last iteration, so the only time condor streams stdout back to the host machine is after the last iteration. This makes me sad because no updates are streamed back to the host during sampling, so I have no way to satisfy my curiosity on the expected runtime.
In summary, the issue is that progressbar=True doesn't actually print the progress bar to stdout in such a way that condor can stream it until sampling is completed.
I want refresh=True here for all iterations, not just the last: https://github.com/pymc-devs/pymc/blob/2842401f95de74ab37b7750cff455af28cddaffa/pymc/util.py#L893-L908
Reproduceable code example:
pm.sample() # on HTC
Error message:
PyMC version information:
Latest
Context for the issue:
No response
@tvwenger @ricardoV94 is this need to be fixed?, Let me know will raise a pr for it. Thanks