nvflare.app_common.executors.multi_process_executor module¶
- class MultiProcessExecutor(executor_id=None, num_of_processes=1, components=None)[source]¶
Bases:
Executor
Manage the multi-process execution life cycle.
- Parameters:
executor_id – executor component ID
num_of_processes – number of processes to create
components – a dictionary for component classes to their arguments
- execute(task_name: str, shareable: Shareable, fl_ctx: FLContext, abort_signal: Signal) Shareable [source]¶
Executes a task.
- Parameters:
task_name (str) – task name.
shareable (Shareable) – input shareable.
fl_ctx (FLContext) – fl context.
abort_signal (Signal) – signal to check during execution to determine whether this task is aborted.
- Returns:
An output shareable.
- abstract get_multi_process_command() str [source]¶
Provide the command for starting multi-process execution.
- Returns:
multi-process starting command