nvflare.private.fed.client.client_executor module¶
- class ClientExecutor[source]¶
Bases:
ABC
- 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 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(client, startup)[source]¶
Bases:
ClientExecutor
Run the Client executor in a child process.
To init the ProcessExecutor.
- Parameters:
startup – startup folder
- check_status(job_id)[source]¶
Checks the status of the running client.
- Parameters:
job_id – the job_id
- Returns:
A client status message
- 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.
- 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