nvflare.private.fed.client.client_engine_internal_spec module

class ClientEngineInternalSpec[source]

Bases: ClientEngineSpec, ABC

The ClientEngineInternalSpec defines the ClientEngine APIs running in the parent process.

abstract abort_app(job_id: str) str[source]

Aborts the app execution for the specified run.

Returns:

A string message.

abstract abort_task(job_id: str) str[source]

Abort the client current executing task.

Returns:

A string message.

abstract delete_run(job_id: str) str[source]

Deletes the specified run.

Parameters:

job_id – job_id

Returns:

A string message.

abstract deploy_app(app_name: str, job_id: str, job_meta: dict, client_name: str, app_data) str[source]

Deploy the app to specified run.

Parameters:
  • app_name – FL_app name

  • job_id – job that the app is to be deployed to

  • job_meta – meta data of the job that the app belongs to

  • client_name – name of the client

  • app_data – zip data of the app

Returns:

A error message if any; empty str is okay.

abstract get_all_job_ids() [][source]

Get all the client job_id.

Returns: list of all the job_id

abstract get_client_name() str[source]

Get the ClientEngine client_name.

Returns: the client_name

abstract get_engine_status()[source]
abstract notify_job_status(job_id: str, job_status)[source]

Notify the engine what’s the client job’s new status.

Parameters:
  • job_id – job_id

  • job_status – Client job status

Returns:

abstract restart() str[source]

Restarts the FL client.

Returns:

A string message.

abstract shutdown() str[source]

Shuts down the FL client.

Returns:

A string message.

abstract start_app(job_id: str, allocated_resource: dict | None = None, token: str | None = None, resource_manager=None) str[source]

Starts the app for the specified run.

Parameters:
  • job_id – job_id

  • allocated_resource – allocated resource

  • token – token

  • resource_manager – resource manager

Returns:

A string message.