liesel-devs / liesel

A probabilistic programming framework
https://liesel-project.org
MIT License
38 stars 2 forks source link

Enable progress bar in Jupyter notebooks #208

Open jobrachem opened 2 weeks ago

jobrachem commented 2 weeks ago

Currently, we use tqdm(disable=None, ...) for the sampling progress bar:

It disables the progress bar in non-TTY environments. A TTY (teletypewriter) refers to environments like a terminal or console that supports interactive input/output. In non-TTY environments (e.g., file redirection or certain automated scripts), the progress bar is disabled.

Unfortunately, this has the effect of disabling the progress bar in Jupyter notebooks. This PR removes this argument.

If progress bar printing should be disabled, for example because you are running code on a server and logging output to a file, users can use the existing setting EngineBuilder.show_progress = False.

This notebook can be used to see the effect: test_sampling.ipynb.zip