nvflare.job_config.fed_job_config module
- class FedJobConfig(job_name, min_clients, mandatory_clients=None, meta_props=None)[source]
Bases:
objectFedJobConfig represents the job in the NVFlare.
FedJobConfig uses the job_name, min_clients and optional mandatory_clients to create the object. It also provides the method to add in the FedApp, the deployment map of the FedApp and participants, and the resource _spec requirements of the participants if needed.
- Parameters:
job_name – the name of the NVFlare job
min_clients – the minimum number of clients for the job
mandatory_clients – mandatory clients to run the job (optional)
meta_props – additional meta properties for the job (optional)
- add_fed_app(app_name: str, fed_app: FedAppConfig)[source]
- locate_imports(sf)[source]
Locate imported modules in a Python source file.
- Parameters:
sf – source file
- Returns:
yield (module name or None, relative import level) tuples
- set_app_packages(app_packages: List[str])[source]
Set app packages. When generating job config, code from these packages will not be included into “custom” folder.
- Parameters:
app_packages – app packages
Returns: None