nvflare.apis.client_engine_spec module

class ClientEngineSpec[source]

Bases: ABC

abstract fire_event(event_type: str, fl_ctx: FLContext)[source]
abstract get_all_components() dict[source]
abstract get_component(component_id: str) object[source]
abstract get_task_assignment(fl_ctx: FLContext) TaskAssignment[source]
get_widget(widget_id: str) Widget[source]
abstract get_workspace() Workspace[source]
abstract new_context() FLContext[source]
abstract send_task_result(result: Shareable, fl_ctx: FLContext) bool[source]
class TaskAssignment(name: str, task_id: str, data: Shareable)[source]

Bases: object

Init TaskAssignment.

Keeps track of information about the assignment of a task, including the time that it was created after being fetched by the Client Run Manager.

Parameters
  • name – task name

  • task_id – task id

  • data – the Shareable data for the task assignment