nvflare.app_common.abstract.task_handler module¶
- class TaskHandler(local_comp_id: str, local_comp_type: type)[source]¶
Bases:
InitFinalComponent
,ABC
TaskHandler focuses on computing and returning results only for given task.
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(task_name: str, shareable: Shareable, fl_ctx: FLContext, abort_signal: Signal) Shareable [source]¶
Executes a task.
- Parameters:
task_name – task name
shareable – input data
fl_ctx – FLContext
abort_signal (Signal) – signal to check during execution to determine whether this task is aborted.
- Returns:
Output data