nvflare.app_common.ccwf.client_controller_executor module

class ClientControllerExecutor(controller_id_list: List, task_name_prefix: str = '', persistor_id='persistor', final_result_ack_timeout=10, max_task_timeout: int = 3600)[source]

Bases: Executor

ClientControllerExecutor for running controllers on client-side using WFCommClient.

  • controller_id_list – List of controller ids, used in order.

  • task_name_prefix – prefix of task names. All CCWF task names are prefixed with this.

  • persistor_id – ID of the persistor component

  • final_result_ack_timeout – timeout for sending final result to participating clients

  • max_task_timeout – Maximum task timeout for Controllers using WFCommClient when task.timeout is set to 0. Defaults to 3600.

broadcast_final_result(result: Learnable, fl_ctx: FLContext)[source]
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.

finalize(fl_ctx: FLContext)[source]

Called to finalize the executor. :param fl_ctx: the FL Context

Returns: None

get_config_prop(name: str, default=None)[source]

Get a specified config property. :param name: name of the property :param default: default value to return if the property is not defined.


handle_event(event_type: str, fl_ctx: FLContext)[source]

Handles events.

  • event_type (str) – event type fired by workflow.

  • fl_ctx (FLContext) – FLContext information.

initialize(fl_ctx: FLContext)[source]

Called to initialize the executor. :param fl_ctx: The FL Context

Returns: None

initialize_controller(controller_id, fl_ctx)[source]
is_task_secure(fl_ctx: FLContext) bool[source]

Determine whether the task should be secure. A secure task requires encrypted communication between the peers. The task is secure only when the training is in secure mode AND private_p2p is set to True.

start_run(fl_ctx: FLContext)[source]
update_status(last_round=None, action=None, error=None, all_done=False)[source]