tqdm version 4.19.5, python 3.5, ubuntu 16.04
tqdm update doesn't respect mininterval or miniters. For example, if I set mininterval = 10 but update every second, the progress bar data will be updated more than every 10s.
While this is not a problem for normal usage, I am interested in passing tqdm into logging. I update the description every inner loop, which causes huge logs.
Could you provide a basic example? This works as expected for me:
from tqdm import tqdm
with tqdm(total=12345678, mininterval=10) as t:
for i in range(12345678):
t.update()
Sorry, I meant set_description
from tqdm import tqdm
with tqdm(total=12345678, mininterval=500) as t:
for i in range(12345678):
t.set_description('%d' % (i * 3))
set_postfix also seems to not respect miniters or mininterval and immediately refreshes the bar, which is problematic whenever we are adding any other metadata to the progress bar.
You need set_*(..., refresh=False) as stated in the function's help.
Most helpful comment
You need
set_*(..., refresh=False)as stated in the function's help.