nvflare.utils.job_launcher_utils module
- add_custom_dir_to_path(app_custom_folder, new_env)[source]
Util method to add app_custom_folder into the sys.path and carry into the child process.
- get_job_launcher_spec(job_meta, site_name, mode)[source]
Get launcher-specific config for a site/mode.
Resolution order: 1. Merge launcher_spec[“default”][mode] with launcher_spec[site][mode] (site wins). 2. Fall back to get_launcher_resource_spec (nested resource_spec backward compat) when
neither launcher_spec[“default”][mode] nor launcher_spec[site][mode] is present — even if launcher_spec exists for other sites or modes.
Returns a dict for the given mode, or an empty dict if not specified.
- get_launcher_resource_spec(job_meta, site_name, mode)[source]
Extract the launcher-mode resource spec for a site from full job meta.
- get_site_launcher_spec(site_spec, mode)[source]
Extract the launcher-mode portion of a single site’s resource spec.
New nested format:
{mode: {...}}— returns the inner dict for mode. Legacy flat format:{num_of_gpus: ...}— treated as process mode for backward compatibility; Docker and K8s modes receive an empty spec.