nvflare.app_common.statistics.json_stats_file_persistor module

class JsonStatsFileWriter(output_path: str, json_encoder_path: str = '')[source]

Bases: StatisticsWriter

Init FLComponent.

The FLComponent is the base class of all FL Components. (executors, controllers, responders, filters, aggregators, and widgets are all FLComponents)

FLComponents have the capability to handle and fire events and contain various methods for logging.

get_output_path(fl_ctx: FLContext) str[source]
save(data: dict, overwrite_existing, fl_ctx: FLContext)[source]

Save data.

To perform data privacy min_count check, failure_count is always required.

Parameters:
  • data – the data to be saved

  • overwrite_existing – whether or not to overwrite existing

  • fl_ctx – FLContext

Returns: None