nvflare.app_common.ccwf.ccwf_job module

class CCWFJob(name: str = 'fed_job', min_clients: int = 1, mandatory_clients: List[str] | None = None, executor_tasks: List[str] | None = None, external_resources: str | None = None)[source]

Bases: FedJob

Client-Controlled Workflow Job.

Provides methods for adding client-controlled swarm learning, cyclic, and cross-site evaluation workflows.

Parameters:
  • name (name, optional) – name of the job. Defaults to “fed_job”

  • min_clients (int, optional) – the minimum number of clients for the job. Defaults to 1.

  • mandatory_clients (List[str], optional) – mandatory clients to run the job. Default None.

  • executor_tasks (List[str], optional) – tasks for the executor

  • external_resources (str, optional) – External resources directory or filename. Defaults to None.

add_cross_site_eval(cse_config: CrossSiteEvalConfig, persistor_id: str)[source]
add_cyclic(server_config: CyclicServerConfig, client_config: CyclicClientConfig, cse_config: CrossSiteEvalConfig | None = None)[source]
add_swarm(server_config: SwarmServerConfig, client_config: SwarmClientConfig, cse_config: CrossSiteEvalConfig | None = None)[source]
class CrossSiteEvalConfig(start_task_timeout=10, configure_task_timeout=300, eval_task_timeout=30, progress_timeout: float = 3600.0, private_p2p: bool = True, participating_clients=None, evaluators=None, evaluatees=None, global_model_client=None, max_status_report_interval: float = 90.0, eval_result_dir='cross_site_val', get_model_timeout=10)[source]

Bases: object

class CyclicClientConfig(executor: Any, persistor: Any, shareable_generator: Any, learn_task_abort_timeout=5.0, learn_task_ack_timeout=10, final_result_ack_timeout=10)[source]

Bases: object

class CyclicServerConfig(num_rounds: int, start_task_timeout=10, configure_task_timeout=300, participating_clients=None, result_clients=None, starting_client: str = '', max_status_report_interval: float = 90.0, progress_timeout: float = 3600.0, private_p2p: bool = True, cyclic_order: str = 'fixed')[source]

Bases: object

class SwarmClientConfig(executor: Any, persistor: Any, shareable_generator: Any, aggregator: Any, metric_comparator: Any | None = None, model_selector: Any | None = None, learn_task_check_interval=1.0, learn_task_abort_timeout=5.0, learn_task_ack_timeout=10, learn_task_timeout=None, final_result_ack_timeout=10, min_responses_required: int = 1, wait_time_after_min_resps_received: float = 10.0)[source]

Bases: object

class SwarmServerConfig(num_rounds: int, start_round: int = 0, start_task_timeout=10, configure_task_timeout=300, participating_clients=None, result_clients=None, starting_client: str = '', max_status_report_interval: float = 90.0, progress_timeout: float = 3600.0, private_p2p: bool = True, aggr_clients=None, train_clients=None)[source]

Bases: object