pyraug.config

class pyraug.config.BaseConfig[source]

This is the BaseConfig class which defines all the useful loading and saving methods of the configs

classmethod from_dict(config_dict)[source]

Creates a BaseConfig instance from a dictionnary

Parameters

config_dict (dict) – The Python dictionnary containing all the parameters

Returns

The created instance

Return type

BaseConfig

classmethod from_json_file(json_path)[source]

Creates a BaseConfig instance from a JSON config file

Parameters

json_path (str) – The path to the json file containing all the parameters

Returns

The created instance

Return type

BaseConfig

save_json(dir_path, filename)[source]

Saves a .json file from the dataclass

Parameters
  • dir_path (str) – path to the folder

  • filename (str) – the name of the file

to_dict()[source]

Transforms object into a Python dictionnary

Returns

The dictionnary containing all the parameters

Return type

(dict)

to_json_string()[source]

Transforms object into a JSON string

Returns

The JSON str containing all the parameters

Return type

(str)