nvflare.app_common.executors.error_handling_executor module

class ErrorHandlingExecutor[source]

Bases: Executor, ABC

This class adds error handling mechanisms to Executor spec.

It also makes sharable convertible to DXO. It delegates the task execution to TaskHandler.

Init FLComponent.

The FLComponent is the base class of all FL Components. (executors, controllers, responders, filters, aggregators, and widgets are all FLComponents)

FLComponents have the capability to handle and fire events and contain various methods for logging.

execute(task_name: str, shareable: Shareable, fl_ctx: FLContext, abort_signal: Signal) Shareable[source]

Executes a task.

  • 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.


An output shareable.

finalize(fl_ctx: FLContext)[source]
abstract get_data_kind() str[source]
abstract get_task_handler(fl_ctx: FLContext) TaskHandler[source]
handle_event(event_type: str, fl_ctx: FLContext)[source]

Handles events.

  • event_type (str) – event type fired by workflow.

  • fl_ctx (FLContext) – FLContext information.

initialize(fl_ctx: FLContext)[source]