nvflare.app_common.statistics.statisitcs_objects_decomposer module

class BinDecomposer[source]

Bases: Decomposer

decompose(b: Bin, manager: DatumManager | None = None) Any[source]

Decompose the target into types supported by msgpack or classes with decomposers registered.

Msgpack supports primitives, bytes, memoryview, lists, dicts.

Parameters:
  • target – The instance to be serialized

  • manager – Datum manager to store externalized datum

Returns:

The decomposed serializable objects

recompose(data: list, manager: DatumManager | None = None) Bin[source]

Reconstruct the object from decomposed components.

Parameters:
  • data – The decomposed component

  • manager – Datum manager to internalize datum

Returns:

The reconstructed object

supported_type() Type[Any][source]

Returns the type/class supported by this decomposer.

Returns:

The class (not instance) of supported type

class BinRangeDecomposer[source]

Bases: Decomposer

decompose(b: BinRange, manager: DatumManager | None = None) Any[source]

Decompose the target into types supported by msgpack or classes with decomposers registered.

Msgpack supports primitives, bytes, memoryview, lists, dicts.

Parameters:
  • target – The instance to be serialized

  • manager – Datum manager to store externalized datum

Returns:

The decomposed serializable objects

recompose(data: list, manager: DatumManager | None = None) BinRange[source]

Reconstruct the object from decomposed components.

Parameters:
  • data – The decomposed component

  • manager – Datum manager to internalize datum

Returns:

The reconstructed object

supported_type() Type[Any][source]

Returns the type/class supported by this decomposer.

Returns:

The class (not instance) of supported type

class DataTypeDecomposer[source]

Bases: Decomposer

decompose(target: DataType, manager: DatumManager | None = None) Any[source]

Decompose the target into types supported by msgpack or classes with decomposers registered.

Msgpack supports primitives, bytes, memoryview, lists, dicts.

Parameters:
  • target – The instance to be serialized

  • manager – Datum manager to store externalized datum

Returns:

The decomposed serializable objects

recompose(data: Any, manager: DatumManager | None = None) DataType[source]

Reconstruct the object from decomposed components.

Parameters:
  • data – The decomposed component

  • manager – Datum manager to internalize datum

Returns:

The reconstructed object

supported_type() Type[DataType][source]

Returns the type/class supported by this decomposer.

Returns:

The class (not instance) of supported type

class FeatureDecomposer[source]

Bases: Decomposer

decompose(f: Feature, manager: DatumManager | None = None) Any[source]

Decompose the target into types supported by msgpack or classes with decomposers registered.

Msgpack supports primitives, bytes, memoryview, lists, dicts.

Parameters:
  • target – The instance to be serialized

  • manager – Datum manager to store externalized datum

Returns:

The decomposed serializable objects

recompose(data: list, manager: DatumManager | None = None) Feature[source]

Reconstruct the object from decomposed components.

Parameters:
  • data – The decomposed component

  • manager – Datum manager to internalize datum

Returns:

The reconstructed object

supported_type() Type[Any][source]

Returns the type/class supported by this decomposer.

Returns:

The class (not instance) of supported type

class HistogramDecomposer[source]

Bases: Decomposer

decompose(b: Histogram, manager: DatumManager | None = None) Any[source]

Decompose the target into types supported by msgpack or classes with decomposers registered.

Msgpack supports primitives, bytes, memoryview, lists, dicts.

Parameters:
  • target – The instance to be serialized

  • manager – Datum manager to store externalized datum

Returns:

The decomposed serializable objects

recompose(data: list, manager: DatumManager | None = None) Histogram[source]

Reconstruct the object from decomposed components.

Parameters:
  • data – The decomposed component

  • manager – Datum manager to internalize datum

Returns:

The reconstructed object

supported_type() Type[Any][source]

Returns the type/class supported by this decomposer.

Returns:

The class (not instance) of supported type

class HistogramTypeDecomposer[source]

Bases: Decomposer

decompose(target: HistogramType, manager: DatumManager | None = None) Any[source]

Decompose the target into types supported by msgpack or classes with decomposers registered.

Msgpack supports primitives, bytes, memoryview, lists, dicts.

Parameters:
  • target – The instance to be serialized

  • manager – Datum manager to store externalized datum

Returns:

The decomposed serializable objects

recompose(data: Any, manager: DatumManager | None = None) HistogramType[source]

Reconstruct the object from decomposed components.

Parameters:
  • data – The decomposed component

  • manager – Datum manager to internalize datum

Returns:

The reconstructed object

supported_type() Type[HistogramType][source]

Returns the type/class supported by this decomposer.

Returns:

The class (not instance) of supported type

class StatisticConfigDecomposer[source]

Bases: Decomposer

decompose(statistic_config: StatisticConfig, manager: DatumManager | None = None) Any[source]

Decompose the target into types supported by msgpack or classes with decomposers registered.

Msgpack supports primitives, bytes, memoryview, lists, dicts.

Parameters:
  • target – The instance to be serialized

  • manager – Datum manager to store externalized datum

Returns:

The decomposed serializable objects

recompose(data: list, manager: DatumManager | None = None) StatisticConfig[source]

Reconstruct the object from decomposed components.

Parameters:
  • data – The decomposed component

  • manager – Datum manager to internalize datum

Returns:

The reconstructed object

supported_type() Type[Any][source]

Returns the type/class supported by this decomposer.

Returns:

The class (not instance) of supported type

fobs_registration()[source]