relevanceai.progress_bar
Get a good progress bar
Module Contents
Classes
Context manager that does no additional processing. |
Functions
|
- class relevanceai.progress_bar.ProgressBar
- __call__(self, iterable)
- static is_in_ipython()
Determines if current code is executed within an ipython session.
- is_in_notebook(self) bool
Determines if current code is executed from an ipython notebook.
- get_bar(self)
- class relevanceai.progress_bar.NullProgressBar(iterable: int = None)
Bases:
contextlib.AbstractContextManagerContext manager that does no additional processing.
Used as a stand-in for a normal context manager, when a particular block of code is only sometimes used with a normal context manager:
cm = optional_cm if condition else nullcontext() with cm:
# Perform operation, using optional_cm if condition is True
- __enter__(self)
Return self upon entering the runtime context.
- __exit__(self, *excinfo)
Raise any exception triggered within the runtime context.
- __iter__(self)
- relevanceai.progress_bar.progress_bar(iterable, show_progress_bar: bool = False)