5.1.1.9.1.4. FedEval.utils.parameter_parser

5.1.1.9.1.4.1. Module Contents

5.1.1.9.1.4.1.1. Classes

ParamParserInterface

Abstract class of ParamParser, containing basic params parse functions.

ParamParser

an implentation of ParamParserInterface.

5.1.1.9.1.4.1.2. Attributes

Data

XYData

FedEval.utils.parameter_parser.Data
FedEval.utils.parameter_parser.XYData
class FedEval.utils.parameter_parser.ParamParserInterface

Abstract class of ParamParser, containing basic params parse functions.

Raises:

NotImplementedError – raised when methods in this class was not implemented.

abstract static parse_model() tensorflow.keras.Model

construct a tensorflow model according to the model configuration.

Raises:

NotImplementedError – raised when called but not overriden.

Returns:

the model constructed.

Return type:

tf.keras.Model

abstract static parse_data(client_id) Tuple[XYData, XYData, XYData]

load data for train/test/validation purpose according to the data configuration.

client_id

the id of the client which issued this data parse procedure.

Raises:

NotImplementedError – raised when called but not overriden.

Returns:

[data for train, data for test, data for validation]

Return type:

Tuple[XYData, XYData, XYData]

class FedEval.utils.parameter_parser.ParamParser

Bases: ParamParserInterface

an implentation of ParamParserInterface.

static parse_model()

construct a tensorflow model according to the model configuration.

Raises:

NotImplementedError – raised when called but not overriden.

Returns:

the model constructed.

Return type:

tf.keras.Model

static parse_data(client_id) Tuple[XYData, XYData, XYData]

load data for train/test/validation purpose according to the data configuration.

client_id

the id of the client which issued this data parse procedure.

Raises:

NotImplementedError – raised when called but not overriden.

Returns:

[data for train, data for test, data for validation]

Return type:

Tuple[XYData, XYData, XYData]