nvflare.apis.executor module

class Executor[source]

Bases: FLComponent, ABC

Executors run on federated client side.

Each job can contain multiple applications or apps folder. Each site (server or client) will have 1 app deployed for that job. The server side app contains a Controller that will schedule Task. The client side app contains an Executor that will execute corresponding logic based on Task’s name.

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.

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