nvflare.private.fed.server.job_runner module

class JobRunner(workspace_root: str)[source]

Bases: FLComponent

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.

abort_client_run(job_id, client_sites: List[str], fl_ctx)[source]

Send the abort run command to the clients

Parameters:
  • job_id – job_id

  • client_sites – Clients to be aborted

  • fl_ctx – FLContext

handle_event(event_type: str, fl_ctx: FLContext)[source]

Handles events.

Parameters:
  • event_type (str) – event type fired by workflow.

  • fl_ctx (FLContext) – FLContext information.

remove_running_job(job_id: str)[source]
restore_running_job(run_number: str, job_id: str, job_clients, snapshot, fl_ctx: FLContext)[source]
run(fl_ctx: FLContext)[source]

Starts job runner.

stop()[source]
stop_all_runs(fl_ctx: FLContext)[source]
stop_run(job_id: str, fl_ctx: FLContext)[source]
update_abnormal_finished_jobs(running_job_ids, fl_ctx: FLContext)[source]
update_unfinished_jobs(fl_ctx: FLContext)[source]