TQDMProgressBarWrapper#
- class braintools.trainer.TQDMProgressBarWrapper(**kwargs)#
Progress bar wrapper using tqdm.
Provides rich progress bar features with tqdm.
- Parameters:
**kwargs – Additional arguments passed to tqdm.
Examples
Keyword arguments go to
tqdm; here the bar writes to a buffer:>>> import io >>> import braintools >>> buf = io.StringIO() >>> pbar = braintools.trainer.TQDMProgressBarWrapper(file=buf, leave=True) >>> pbar.start(total=3, desc='Training') >>> pbar.update(3, loss=0.5) >>> pbar.close() >>> 'Training' in buf.getvalue() and '3/3' in buf.getvalue() True