-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Closed
Labels
question/docs ‽Documentation clarification candidateDocumentation clarification candidate
Description
I want to do something like this, but i also want the elapsed timer to be reset to 0.
with tqdm(file=sys.stdout, leave=False, total=batch_length) as pbar:
for i in data:
pbar.update(1)
time.sleep(1)
if some_condition:
pbar.n = 0
Or is this the only way to achieve it?
pbar = tqdm(file=sys.stdout, leave=False, total=batch_length)
for i in data:
pbar.update(1)
time.sleep(1)
if some_condition:
pbar.close()
pbar = tqdm(file=sys.stdout, leave=False, total=batch_length)
Metadata
Metadata
Assignees
Labels
question/docs ‽Documentation clarification candidateDocumentation clarification candidate