-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Closed
Labels
p3-enhancement 🔥Much new such featureMuch new such feature
Description
Currently tqdm provides two mechanism to customize the message string:
- specify which of the predefined keys should go where, through the
bar_format
argument - provide additional elements through the
postfix
argument.
It would be more powerful to let the users specify the bar_format
with a mix of predefined and user-defined keys, and provide a mechanism like the set_postfix
method to provide the values for the user-defined keys through a dictionary.
This is the kind of behaviour that I am imagining:
pbar = tqdm(total=num_batches,
bar_format='Epoch {epoch:2d} - {n_fmt}/{total_fmt}{desc}{percentage}%|{bar}| '
'[{elapsed}<{remaining}, {rate_fmt}]')
for epoch in range(max_epochs):
pbar.set_dict({'epoch': epoch})
pbar.update(1)
# ...
pbar.close()
Metadata
Metadata
Assignees
Labels
p3-enhancement 🔥Much new such featureMuch new such feature