nvflare.edge.executors.edge_model_executor module

class EdgeModelExecutor(aggr_factory_id: str, max_model_versions: int | None = None, update_timeout=60.0)[source]

Bases: EdgeTaskExecutor

Constructor of EdgeTaskExecutor.

Parameters:
  • updater_id – ID of the updater

  • update_timeout – timeout for update messages sent to parent

  • learner_id – ID of the learner component. Optional.

accept_alive_device(device_id: str, fl_ctx: FLContext)[source]
accept_device_result(result_report: ResultReport, current_task: TaskInfo, fl_ctx: FLContext)[source]
get_updater(fl_ctx: FLContext)[source]
process_edge_result_report(request: ResultReport, current_task: TaskInfo, fl_ctx: FLContext) ResultResponse[source]

Handle result report from device The report task_id may be different from current task_id. Let HAM deal with it

process_edge_selection_request(request: SelectionRequest, current_task: TaskInfo, fl_ctx: FLContext) SelectionResponse[source]

Handle selection request from device

process_edge_task_request(request: TaskRequest, current_task: TaskInfo, fl_ctx: FLContext) TaskResponse[source]

Handle task request from device

task_ended(task: TaskInfo, fl_ctx: FLContext)[source]

This method is called when the current task is ended. Subclass can implement this method to finish task processing.

Parameters:
  • task – info of the task that is ended

  • fl_ctx – FLContext object

Returns: None

task_started(task: TaskInfo, fl_ctx: FLContext)[source]

This method is called when a task assignment is received from the controller. Subclass can implement this method to prepare for task processing.

Parameters:
  • task – info of the received task

  • fl_ctx – FLContext object

Returns: None