Serialize

class matorage.Serialize[source]
to_dict()[source]

Serializes this instance to a Python dictionary.

Returns

Dictionary of all the attributes that make up this configuration instance,

Return type

Dict[str, any]

to_json_file(json_file_path)[source]

Save this instance to a json file.

Parameters

json_file_path (string) – Path to the JSON file in which this configuration instance’s parameters will be saved.

to_json_string()[source]

Serializes this instance to a JSON string.

Returns

String containing all the attributes that make up this configuration instance in JSON format.

Return type

string

classmethod from_json_file(json_file)[source]

Constructs a Config from the path to a json file of parameters.

Parameters

json_file (string) – Path to the JSON file containing the parameters.

Returns

An instance of a configuration object

Return type

DataConfig ModelConfig