notebook: Progress bar updating problem following kernel interrupt
Using a progress bar to monitor computation progress in the notebook (e.g. tqdm
) runs into a visual updating glitch when run following the kernel being interrupted (either by keyboard or a break
statement). Any progress bar run after the interruption results in output like the following:
Only a restart of the kernel restores behavior.
Running notebook 4.4.1 on macOS 10.12.3 and Safari (Python 3.6).
About this issue
- Original URL
- State: open
- Created 7 years ago
- Reactions: 17
- Comments: 17 (1 by maintainers)
None of the above works for me. I find that running to following sorts this issue after error (It just clears all the instances of progress bars in the background):
(If you would like to updoot - I’ve posted this solution on stack)
It works if you go on of the ways:
or
Going through this issue as well. If anyone has a solution please let me know.
@takluyver @fonnesbeck Same issue here as well! The only solution I stumbled over so far is to restart the kernel. Also, if you interrupt multiple times, it accumulates lines between every update. For example, two interrupts would accumulate two lines. Look at the following:
The bug affects me as well: if I interrupt in the middle of the tqdm bar, I must restart the kernel to avoid this issue. This is tedious because it is very common to interrupt long processes (you hit ctrl-enter, and check for bugs or improvements while the job is running, if any found, you interrupt, fix and re-run).
For those of you using
tqdm
, usetqdm_notebook
instead.See: https://github.com/tqdm/tqdm/issues/375#issuecomment-328466265
Any ideas on this one? It continues to be an issue in current master.