cmdstanpy
cmdstanpy copied to clipboard
tqdm progress bars in colab, jupyterlab
The newest version isn't showing the progress of each chain as before. I tried to do show_progress = 1 and doesn't work. How do I make it show the progress bar?
Are you using cmdstanpy from the console or something like a Jupyter notebook? Did anything else about your environment change?
Are you using cmdstanpy from the console or something like a Jupyter notebook? Did anything else about your environment change?
I'm using it on colab. It used to show progress
I still see progress bars in colab using 1.0.5.
It seems like colab changed something recently which may have affected this. You may need to change the version of ipywidgets colab is using, see https://github.com/googlecolab/colabtools/issues/498#issuecomment-1220982875
I still see progress bars in colab using 1.0.5.
It seems like colab changed something recently which may have affected this. You may need to change the version of ipywidgets colab is using, see googlecolab/colabtools#498 (comment)
Thanks!
on my machine, looks like tqdm works in jupyter notebook but not in jupyter lab. something is broken, somewhere.
Tqdm works in lab for me, haven’t used notebook in a while but can check on Monday
my python environment is a mess, so that's probably the problem, but after updating the world today, tqdm is broken in jupyter lab - this was working just fine yesterday - tqdm is running, but somethings getting in the way of the output. I installed the cmdstanjupyter package, FWIW...

this is a problem in jupyter lab but not in jupyter notebook. discussion here - https://github.com/tqdm/tqdm/issues/394#issuecomment-384628758
reopening this for further investigation:
- what should default behavoir be?
- what can we detect?
- are progress bars worth it?
on my machine, looks like tqdm works in jupyter notebook but not in jupyter lab. something is broken, somewhere.
Strangely, it still does not work in RetroLab (I thought RetroLab is closer to jupyter notebook rather than to jupyter lab).
my python environment is a mess
I've got the same problem with fresh install. The difference is that I changed from conda to base installation (using pacman), and then I got the problem :/
However, when I used the colab recommendation to downgrade ipywidgets, it worked for me: pip install ipywidgets==7.7.1
after updating way too many packages, but downgrading ipywidgets and nbconvert, both jupyter notebook and jupyter lab can't display tqdm progress bars.

I think we should cut our losses on tqdm - my suggestion would be to change default for both show_console
and show_progress
to False
.
- if a model takes a long time to run,
show_console
is the safer option. - if the model doesn't take a long time to run, tqdm progress bars are just a sexy distraction.
I currently have a working setup with:
tqdm 4.61.1
jupyter-packaging 0.10.3
jupyter_client 6.1.12
jupyter_core 4.7.1
jupyter_server 1.9.0
jupyterlab 3.0.16
jupyterlab_code_formatter 1.4.10
jupyterlab_pygments 0.1.2
jupyterlab_server 2.6.0
jupyterlab_widgets 1.0.2
ipykernel 5.5.5
ipython 7.25.0
This most likely deserves a bug report upstream in one of htese packages if we can figure out what's wrong
do you have ipywidgets?
ipywidgets 7.6.5
re: ditching tqdm, I quite like the output and find it valuable. Amenable to changing the defaults or trying to avoid showing it for trivial things though
this config works, although installing that set of packages got a bunch of complaints from pip, and jupyter lab console spews warnings -
[W 2022-08-30 09:59:46.343 ServerApp] Config option `template_path` not recognized by `ExporterCollapsibleHeadings`. Did you mean one of: `extra_template_paths, template_name, template_paths`?
see https://github.com/ipython-contrib/jupyter_contrib_nbextensions/issues/1529
there's also this: https://stackoverflow.com/questions/73484988/tqdm-notebook-bar-outputs-text-in-jupyter-lab
pip install -U jupyterlab-widgets==1.1.1
pip install -U ipywidgets==7.7.1
whatever's currently in the docs about progress bars and tqdm should be updated. seems like this problem just won't go away.
Another option we could consider is forcing the text interface of tqdm (or maybe allow something like show_progress='text'
). This will always show something, although if you combine it with things like print statements it can get quite messy in notebooks.
Is there any action to be taken on this issue still?
Is there any action to be taken on this issue still?
It’s fixed
Great, thanks!