nvflare.private.fed.app.client.sub_worker_process module

Sub_worker process to start the multi-processes client.

class EventRelayer(cell, parent_fqcn, local_rank)[source]

Bases: FLComponent

To relay the event from the worker_process.

To init the EventRelayer.

Parameters:
  • cell – the local cell.

  • parent_fqcn – FQCN of the parent cell

  • local_rank – process local rank

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

To handle the event.

Parameters:
  • event_type – event_type

  • fl_ctx – FLContext

relay_event(run_manager, data)[source]

To relay the event.

Parameters:
  • run_manager – Client_Run_Manager

  • data – event data

class SubWorkerExecutor(args, workspace, num_of_processes, local_rank)[source]

Bases: Runner

Init FLComponent.

The FLComponent is the base class of all FL Components. (executors, controllers, responders, filters, aggregators, and widgets are all FLComponents)

FLComponents have the capability to handle and fire events and contain various methods for logging.

execute_command(request: Message) Message[source]
run()[source]
stop()[source]

Method call at the end of the Runner process.

main(args)[source]
parse_arguments()[source]

Sub_worker process program.