nvflare.edge.assessors.timeout module

class TimeoutAssessor(shareable_generator_id: str, aggregator_id: str, persistor_id: str, timeout: float)[source]

Bases: SGAPAssessor

This assessor implements its required logic by using a Shareable Generator, an Aggregator, and a Persistor (SGAP).

Parameters:
  • shareable_generator_id – component ID of the Shareable Generator. If empty, the PassthroughShareableGenerator will be used.

  • aggregator_id – component ID of the Aggregator.

  • persistor_id – component ID of the Persistor. If not specified, the Persistor will load initial model and save the final model.

do_assessment(fl_ctx: FLContext) Assessment[source]
end_task(fl_ctx: FLContext)[source]

This is called by SAGE at the end of a task.

Parameters:

fl_ctx – FLContext object

Returns: None

start_task(fl_ctx: FLContext)[source]

This is called by SAGE at the start of a task.

Parameters:

fl_ctx – FLContext object

Returns: task data to be sent to clients