nvflare.apis.job_launcher_spec module

class JobHandleSpec[source]

Bases: ABC

abstract poll()[source]

To get the return code of the job run.

Returns: return_code

abstract terminate()[source]

To terminate the job run.

Returns: None

abstract wait()[source]

To wait until the job run complete.

Returns: returns until the job run complete.

class JobLauncherSpec[source]

Bases: FLComponent, ABC

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.

abstract launch_job(job_meta: dict, fl_ctx: FLContext) JobHandleSpec[source]

To launch a job run.

Parameters:
  • job_meta – job metadata

  • fl_ctx – FLContext

Returns: a JobHandle instance.

class JobProcessArgs[source]

Bases: object

APP_ROOT = 'app_root'
AUTH_TOKEN = 'auth_token'
CLIENT_NAME = 'client_name'
EXE_MODULE = 'exe_module'
JOB_ID = 'job_id'
OPTIONS = 'options'
PARENT_CONN_SEC = 'parent_conn_sec'
PARENT_URL = 'parent_url'
RESTORE_SNAPSHOT = 'restore_snapshot'
ROOT_URL = 'root_url'
SCHEME = 'scheme'
SERVICE_HOST = 'service_host'
SERVICE_PORT = 'service_port'
SSID = 'ssid'
STARTUP_CONFIG_FILE = 'startup_config_file'
STARTUP_DIR = 'startup_dir'
TARGET = 'target'
TOKEN_SIGNATURE = 'auth_signature'
WORKSPACE = 'workspace'
class JobReturnCode[source]

Bases: ProcessExitCode

ABORTED = 9
EXECUTION_ERROR = 1
SUCCESS = 0
UNKNOWN = 127
add_launcher(launcher, fl_ctx: FLContext)[source]