nvflare.private.fed.client.client_executor module¶
- class ClientExecutor(uid, startup)[source]¶
Bases:
object
To init the ClientExecutor.
- Parameters
uid – client name
startup – startup folder
- abort_task(client, job_id)[source]¶
To abort the client executing task.
- Parameters
client – the FL client object
job_id – the job_id
- abort_train(client, job_id)[source]¶
To abort the client training.
- Parameters
client – the FL client object
job_id – the job_id
- check_status(client, job_id) str [source]¶
To check the status of the running client.
- Parameters
client – the FL client object
job_id – the job_id
- Returns
A client status message
- get_run_info(job_id) dict [source]¶
Get the run information.
- Parameters
job_id – the job_id
- Returns
A dict of run information.
- send_aux_command(shareable: Shareable, job_id)[source]¶
To send the aux command to child process.
- Parameters
shareable – aux message Shareable
job_id – the job_id
- start_train(client, job_id, args, app_root, app_custom_folder, listen_port, allocated_resource, token, resource_consumer, resource_manager, target: str)[source]¶
start_train method to start the FL client training.
- Parameters
client – the FL client object
job_id – the job_id
args – admin command arguments for starting the FL client training
app_root – the root folder of the running APP
app_custom_folder – FL application custom folder
listen_port – port to listen the command.
allocated_resource – allocated resources
token – token from resource manager
resource_consumer – resource consumer
resource_manager – resource manager
target – SP target location
- class ProcessExecutor(uid, startup)[source]¶
Bases:
ClientExecutor
Run the Client executor in a child process.
To init the ProcessExecutor.
- Parameters
uid – client name
startup – startup folder
- abort_task(client, job_id)[source]¶
To abort the client executing task.
- Parameters
client – the FL client object
job_id – the job_id
- abort_train(client, job_id)[source]¶
To abort the client training.
- Parameters
client – the FL client object
job_id – the job_id
- check_status(client, job_id)[source]¶
To check the status of the running client.
- Parameters
client – the FL client object
job_id – the job_id
- Returns
A client status message
- get_run_info(job_id)[source]¶
Get the run information.
- Parameters
job_id – the job_id
- Returns
A dict of run information.
- send_aux_command(shareable: Shareable, job_id)[source]¶
To send the aux command to child process.
- Parameters
shareable – aux message Shareable
job_id – the job_id
- start_train(client, job_id, args, app_root, app_custom_folder, listen_port, allocated_resource, token, resource_consumer: ResourceConsumerSpec, resource_manager: ResourceManagerSpec, target: str)[source]¶
start_train method to start the FL client training.
- Parameters
client – the FL client object
job_id – the job_id
args – admin command arguments for starting the FL client training
app_root – the root folder of the running APP
app_custom_folder – FL application custom folder
listen_port – port to listen the command.
allocated_resource – allocated resources
token – token from resource manager
resource_consumer – resource consumer
resource_manager – resource manager
target – SP target location