braintools.trainer.get_progress_bar#
- braintools.trainer.get_progress_bar(backend='auto', **kwargs)[source]#
Get a progress bar instance.
- Parameters:
backend (
str) – Progress bar backend to use. Options: ‘auto’, ‘simple’, ‘tqdm’, ‘rich’**kwargs – Additional arguments passed to the progress bar.
- Returns:
Progress bar instance.
- Return type:
Examples
'auto'prefers rich, then tqdm, then the dependency-free bar:>>> import braintools >>> type(braintools.trainer.get_progress_bar('simple')).__name__ 'SimpleProgressBar' >>> type(braintools.trainer.get_progress_bar('tqdm')).__name__ 'TQDMProgressBarWrapper' >>> isinstance(braintools.trainer.get_progress_bar(), braintools.trainer.ProgressBar) True