nvflare.recipe.prod_env module
- class ProdEnv(startup_kit_location: str, login_timeout: float = 5.0, username: str = 'admin@nvidia.com', study: str = 'default', extra: dict | None = None)[source]
Bases:
ExecEnvProduction execution environment for submitting and monitoring NVFlare jobs.
This environment uses the startup kit of an NVFlare deployment to submit jobs via the Flare API.
- Parameters:
startup_kit_location (str) – Path to the admin’s startup kit directory.
login_timeout (float) – Timeout (in seconds) for logging into the Flare API session. Must be > 0.
username (str) – Username to log in with.
study (str) – Study name to tag submitted jobs. Defaults to “default”.
extra – extra env info.
- get_job_result(job_id: str, timeout: float = 0.0) str | None[source]
Get the result workspace of a job.
- Parameters:
job_id – The job ID to get results for.
timeout – The timeout for the job to complete. Defaults to 0.0 (no timeout).
- Returns:
The result workspace path if job completed, None if still running or stopped early.
- Return type:
Optional[str]