Love tqdm progress bar, but when I use it on jenkins, I keep getting a bunch of weird artifacts and too much bloat in stdout (specifically, omnipresence of [A
). Is there a secret mode in tqdm to make it work nicely with jenkins? Bonus points for seamless detection of non-interactive shells like jenkins. Here is what my typical output looks like:
label: 0it [00:00, ?it/s][A
[A
16%|#6 | 5378/33302 [36:28<2:30:49, 3.09it/s]
[A
16%|#6 | 5379/33302 [36:29<2:36:46, 2.97it/s]
[A
...
I'd go with something like:
Note that
disable=None
should automatically check things such assys.stdout.isatty()
.Unfortunately there's nothing that can be done about Jenkins not supporting
CR
(\r
), a basic requirement oftqdm
.From https://tqdm.github.io/: