nvflare.private.fed.client.client_executor module

class ClientExecutor[source]

Bases: ABC

abstract abort_app(job_id)[source]

Aborts the running app.

Parameters:

job_id – the job_id

abstract abort_task(job_id)[source]

Aborts the client executing task.

Parameters:

job_id – the job_id

abstract check_status(job_id) str[source]

Checks the status of the running client.

Parameters:

job_id – the job_id

Returns:

A client status message

abstract get_errors(job_id)[source]

Get the error information.

Returns:

A dict of error information.

abstract get_run_info(job_id)[source]

Gets the run information.

Parameters:

job_id – the job_id

Returns:

A dict of run information.

abstract process_aux_command(shareable: Shareable, job_id)[source]

Processes the aux command.

Parameters:
  • shareable – aux message Shareable

  • job_id – the job_id

abstract reset_errors(job_id)[source]

Resets the error information.

Parameters:

job_id – the job_id

abstract start_app(client, job_id, args, app_custom_folder, listen_port, allocated_resource, token, resource_manager, target: str)[source]

Starts the client app.

Parameters:
  • client – the FL client object

  • job_id – the job_id

  • args – admin command arguments for starting the FL client training

  • app_custom_folder – FL application custom folder

  • listen_port – port to listen the command.

  • allocated_resource – allocated resources

  • token – token from resource manager

  • resource_manager – resource manager

  • target – SP target location

class ProcessExecutor(startup)[source]

Bases: ClientExecutor

Run the Client executor in a child process.

To init the ProcessExecutor.

Parameters:

startup – startup folder

abort_app(job_id)[source]

Aborts the running app.

Parameters:

job_id – the job_id

abort_task(job_id)[source]

Aborts the client executing task.

Parameters:

job_id – the job_id

check_status(job_id)[source]

Checks the status of the running client.

Parameters:

job_id – the job_id

Returns:

A client status message

get_conn_client(job_id)[source]
get_errors(job_id)[source]

Get the error information.

Parameters:

job_id – the job_id

Returns:

A dict of error information.

get_run_info(job_id)[source]

Gets the run information.

Parameters:

job_id – the job_id

Returns:

A dict of run information.

get_run_processes_keys()[source]
get_status(job_id)[source]
process_aux_command(shareable: Shareable, job_id)[source]

Processes the aux command.

Parameters:
  • shareable – aux message Shareable

  • job_id – the job_id

reset_errors(job_id)[source]

Resets the error information.

Parameters:

job_id – the job_id

start_app(client, job_id, args, app_custom_folder, listen_port, allocated_resource, token, resource_manager: ResourceManagerSpec, target: str)[source]

Starts the app.

Parameters:
  • client – the FL client object

  • job_id – the job_id

  • args – admin command arguments for starting the worker process

  • app_custom_folder – FL application custom folder

  • listen_port – port to listen the command.

  • allocated_resource – allocated resources

  • token – token from resource manager

  • resource_manager – resource manager

  • target – SP target location