nvflare.job_config.stats_job module

class StatsJob(name: str, statistic_configs: dict, stats_generator: Statistics, output_path: str, min_count: int = 10, min_noise_level=0.1, max_noise_level=0.3, max_bins_percent=10)[source]

Bases: FedJob

FedJob allows users to generate job configurations in a Pythonic way. The to() routine allows users to send different components to either the server or clients.

Parameters:
  • 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)

  • fail_fast – if True, sets dead_client_grace_period to 0 so that a client already reported dead is declared disconnected on the next monitor tick (~0.2 s) rather than after the default 60-second grace period. The job then aborts only when the normal deployment policy is violated: alive clients drop below min_clients, all clients die, or a mandatory client is lost. In the common development scenario where min_clients equals the total number of enrolled clients, this means an immediate abort on any client failure; when min_clients < total enrolled, the disconnect is simply detected faster without necessarily aborting the job. When False (the default), the existing dead-client grace period behaviour applies.

add_privacy_result_filters(site_id: str)[source]
get_stats_controller() StatisticsController[source]
get_stats_output_writer()[source]
setup_clients(sites: List[str])[source]
setup_server(server_name: str = 'server')[source]