nvflare.app_common.filters.statistics_privacy_filter module

class StatisticsPrivacyFilter(result_cleanser_ids: List[str])[source]

Bases: DXOFilter

  • supported_data_kinds – kinds of DXO this filter supports. Empty means all kinds.

  • data_kinds_to_filter – kinds of DXO data to filter. Empty means all kinds.

filter_stats_statistics(dxo: DXO, client_name: str, filters: List[StatisticsPrivacyCleanser]) DXO | None[source]
get_cleansers(result_checker_ids: List[str], fl_ctx: FLContext) List[StatisticsPrivacyCleanser][source]
process_dxo(dxo: DXO, shareable: Shareable, fl_ctx: FLContext) None | DXO[source]

Subclass must implement this method to filter the provided DXO

  • dxo – the DXO to be filtered

  • shareable – the shareable that the dxo belongs to

  • fl_ctx – the FL context


A DXO object that is the result of the filtering, if filtered; None if not filtered.