nvflare.edge.tools.edge_job module
- class EdgeJob(name: str, edge_method: str, min_clients: int = 1)[source]
Bases:
FedJobConstructor of EdgeJob
- Parameters:
name – name of the job.
edge_method – method for matching job request. Goes to the job’s meta.
min_clients – min number of clients required for the job.
- configure_client(aggregator_factory: AggregatorFactory, max_model_versions: int | None = None, update_timeout=5.0, executor_task_name='train', simulation_config_file: str | None = None)[source]
Set up client config.
- Parameters:
aggregator_factory – an AggregatorFactory object to create aggregators when needed.
max_model_versions – max number of model versions to keep.
update_timeout – timeout for status update messages.
executor_task_name – task name for executor.
simulation_config_file – config file for local simulation (optional).
Returns: None
- configure_server(assessor: Assessor, num_rounds: int = 1, task_name: str = 'train', assess_interval: float = 0.5, update_interval: float = 1.0)[source]
Set up server config.
- Parameters:
assessor – The Assessor object for assessing workflow progress.
num_rounds – number of rounds.
task_name – name of the task.
assess_interval – how often to perform assessment.
update_interval – how often the clients should send updates.
Returns: None
- configure_simulation(task_processor: DeviceTaskProcessor, job_timeout: float = 60.0, num_devices: int = 1000, num_workers: int = 10)[source]
Configure simulation with a DeviceTaskProcessor.
- Parameters:
task_processor – the DeviceTaskProcessor object to be used for processing tasks.
job_timeout – timeout for trying to get job.
num_devices – number of devices to simulate.
num_workers – number of workers for executing tasks.
Returns: None