scvi.utils.track

scvi.utils.track(sequence, description='Working...', disable=False, style=None, **kwargs)[source]

Progress bar with ‘rich’ and ‘tqdm’ styles.

Parameters
sequence : IterableIterable

Iterable sequence.

description : strstr (default: 'Working...')

First text shown to left of progress bar.

disable : boolbool (default: False)

Switch to turn off progress bar.

style : {‘rich’, ‘tqdm’} | NoneOptional[Literal[‘rich’, ‘tqdm’]] (default: None)

One of [“rich”, “tqdm”]. “rich” is interactive and is not persistent after close.

**kwargs

Keyword args to tqdm or rich.

Examples

>>> from scvi.utils import track
>>> my_list = [1, 2, 3]
>>> for i in track(my_list): print(i)