fluidimage.executors.exec_sequential#

Execute a topology sequentially#

class fluidimage.executors.exec_sequential.ExecutorBase(topology, path_dir_result, nb_max_workers=None, nb_items_queue_max=None, logging_level='info', sleep_time=None, stop_if_error=False, path_log=None)[source]#

Bases: ABC

Base class for executors.

Parameters:
topologyfluidimage.topology.base.TopologyBase

A computational topology.

path_dir_resultstr or pathlib.Path

The path of the directory where the results have to be saved.

nb_max_workersint, optional (None)
nb_items_queue_maxint, optional (None),
logging_levelstr, optional {“info”},
sleep_timenumber, optional {None},
stop_if_errorbool, optional {False}
log_in_file(*args, sep=' ', end='\n')[source]#

Simple write in the log file (without print)

log_in_file_memory_usage(txt, color='OKGREEN', end='\n')[source]#

Write the memory usage in the log file

exec_one_shot_works()[source]#

Execute all “one shot” functions.

log_exception(exception, work_name, key)[source]#

Log an exception in a file.

Classes

Executor

alias of ExecutorSequential

ExecutorSequential(topology, path_dir_result)

Execute a topology sequentially