nvflare.app_common.statistics.statistics_privacy_cleanser module

class StatisticsPrivacyCleanser[source]

Bases: ABC

abstract apply(statistics: dict, client_name: str) Tuple[dict, bool][source]
cleanse(statistics: dict, statistic_keys: ~typing.List[str], validation_result: ~typing.Dict[str, ~typing.Dict[str, bool]]) -> (<class 'dict'>, <class 'bool'>)[source]
  • statistics – original client local metrics

  • statistic_keys – statistic keys need to be cleansed

  • validation_result – local metrics privacy validation result


filtered metrics with feature metrics that violating the privacy policy be removed from the original metrics