nvflare.apis.dxo_filter module

class DXOFilter(supported_data_kinds: None | List[str], data_kinds_to_filter: None | List[str])[source]

Bases: Filter, ABC

This is the base class for DXO-based filters

  • 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.

process(shareable: Shareable, fl_ctx: FLContext)[source]

Filter process applied to the Shareable object.

  • shareable – shareable

  • fl_ctx – FLContext


a Shareable object

abstract 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.