nvflare.app_common.abstract.launcher module

class Launcher[source]

Bases: ABC

abstract check_run_status(task_name: str, fl_ctx: FLContext) str[source]

Checks the run status of Launcher.

finalize(fl_ctx: FLContext) None[source]
static get_app_dir(fl_ctx: FLContext) str[source]

Gets the deployed application directory.

initialize(fl_ctx: FLContext) None[source]
abstract launch_task(task_name: str, shareable: Shareable, fl_ctx: FLContext, abort_signal: Signal) bool[source]

Launches external system to handle a task.

  • task_name (str) – task name.

  • shareable (Shareable) – input shareable.

  • fl_ctx (FLContext) – fl context.

  • abort_signal (Signal) – signal to check during execution to determine whether this task is aborted.


Whether launch success or not.

abstract stop_task(task_name: str, fl_ctx: FLContext, abort_signal: Signal) None[source]

Stops external system and free up resources.

  • task_name (str) – task name.

  • fl_ctx (FLContext) – fl context.

class LauncherRunStatus[source]

Bases: object

NOT_RUNNING = 'not_running'
RUNNING = 'running'