nvflare.recipe.session_mgr module

class SessionManager(session_params: Dict[str, any])[source]

Bases: object

Centralized session management for POC and Production environments.

Handles all session operations including job submission, monitoring, and lifecycle management. Implements session caching to avoid multiple login/logout cycles.

abort_job(job_id: str) None[source]

Abort the running job.

get_job_result(job_id: str, timeout: float = 0.0) str | None[source]

Get the result workspace of the job.

get_job_status(job_id: str) str | None[source]

Get the status of the job.

submit_job(job: FedJob) str[source]

Submit a job and return job ID.