relevanceai.utils.progress_bar#

Get a good progress bar

Module Contents#

class relevanceai.utils.progress_bar.ProgressBar#
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.utils.progress_bar.NullProgressBar(iterable: int = None)#

Context 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

relevanceai.utils.progress_bar.progress_bar(iterable, show_progress_bar: bool = False)#