pasteur.utils.progress

pasteur.utils.progress#

Description

This utility module provides constants and functions for multiprocessing and progress monitoring in Pasteur.

In most cases, the functions and constants are simple wrappers around existing libraries. The common use of the primitives in the codebase allows for using different implementations in the future.

Functions

close_pool()

get_manager()

Returns the manager of the current process pool.

get_max_workers()

Returns the maximum number of workers in the current process pool.

get_node_name()

get_tqdm_args()

is_jupyter()

limit_pbar_nesting(pbar_gen)

Prevent nesting too much on jupyter.

logging_redirect_pbar()

"Implementation of the logging_redirect_tqdm context manager that supports the rich handler.

process(fun, *args, **kwargs)

Uses a separate process to complete this task, taken from the common pool.

process_async(fun, *args, **kwargs)

Uses a separate process to complete this task, taken from the common pool.

process_in_parallel(fun, per_call_args[, ...])

Processes arguments in parallel using the common process pool and prints progress bar.

set_node_name(name)

Classes

AsyncResultStub(obj)

init_pool([max_workers, refresh_processes])