nvflare.app_common.statistics.statisitcs_objects_decomposer module

class BinDecomposer[source]

Bases: Decomposer

decompose(b: Bin) 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

Returns:

The decomposed serializable objects

recompose(data: list) Bin[source]

Reconstruct the object from decomposed components.

Parameters:

data – The decomposed components

Returns:

The reconstructed object

static 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) 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

Returns:

The decomposed serializable objects

recompose(data: list) BinRange[source]

Reconstruct the object from decomposed components.

Parameters:

data – The decomposed components

Returns:

The reconstructed object

static 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(dt: DataType) 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

Returns:

The decomposed serializable objects

recompose(data: Any) DataType[source]

Reconstruct the object from decomposed components.

Parameters:

data – The decomposed components

Returns:

The reconstructed object

static supported_type() Type[Any][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) 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

Returns:

The decomposed serializable objects

recompose(data: list) Feature[source]

Reconstruct the object from decomposed components.

Parameters:

data – The decomposed components

Returns:

The reconstructed object

static 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) 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

Returns:

The decomposed serializable objects

recompose(data: list) Histogram[source]

Reconstruct the object from decomposed components.

Parameters:

data – The decomposed components

Returns:

The reconstructed object

static 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(ht: HistogramType) 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

Returns:

The decomposed serializable objects

recompose(data: Any) HistogramType[source]

Reconstruct the object from decomposed components.

Parameters:

data – The decomposed components

Returns:

The reconstructed object

static supported_type() Type[Any][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) 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

Returns:

The decomposed serializable objects

recompose(data: list) StatisticConfig[source]

Reconstruct the object from decomposed components.

Parameters:

data – The decomposed components

Returns:

The reconstructed object

static supported_type() Type[Any][source]

Returns the type/class supported by this decomposer.

Returns:

The class (not instance) of supported type

fobs_registration()[source]