nvflare.app_common.ccwf.cse_client_ctl module

class CrossSiteEvalClientController(task_name_prefix='cse', submit_model_task_name='submit_model', validation_task_name='validate', persistor_id='persistor', get_model_timeout=10)[source]

Bases: ClientSideController

Constructor of a ClientSideController object.

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

  • learn_task_name – name for the Learning Task (LT)

  • persistor_id – ID of the persistor component

  • shareable_generator_id – ID of the shareable generator component

  • learn_task_check_interval – interval for checking incoming Learning Task (LT)

  • learn_task_ack_timeout – timeout for sending the LT to other client(s)

  • final_result_ack_timeout – timeout for sending final result to participating clients

  • learn_task_abort_timeout – time to wait for the LT to become stopped after aborting it

  • allow_busy_task – whether a new learn task is allowed when working on current learn task

do_eval(shareable: Shareable, fl_ctx: FLContext, abort_signal: Signal) Shareable[source]
do_learn_task(name: str, task_data: Shareable, fl_ctx: FLContext, abort_signal: Signal)[source]

This is called to do a Learn Task. Subclass must implement this method.

  • name – task name

  • data – task data

  • fl_ctx – FL context of the task

  • abort_signal – abort signal for the task execution


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.

process_config(fl_ctx: FLContext)[source]

This is called to allow the subclass to process config props.

Returns: None

start_run(fl_ctx: FLContext)[source]
start_workflow(shareable: Shareable, fl_ctx: FLContext, abort_signal: Signal) Shareable[source]

This is called for the subclass to start the workflow. This only happens on the starting_client.

  • shareable – the initial task data (e.g. initial model weights)

  • fl_ctx – FL context

  • abort_signal – abort signal for task execution