mdx.behavior_learning.utils.config_util module
- class ConfigUtil(config_file=None)
Bases:
object
Module to read config file and provide a config object.
- Parameters:
config (String) – path to a configuration file. Configuration file can contain a subset of the fields that need to be modified. If no file is provided, then the default values are loaded.
config_util = ConfigUtil("path/to/config/file.json")
- get_config()
Returns a config object corresponding to the config file provided on instantiation or on a subsequent update.
- Returns:
configuration object
- Return type:
dict
config_util = ConfigUtil("path/to/config/file.json") config = config_util.get_config()
- update_config(new_config)
Updates the internal configuration object with the new_config provided.
- Parameters:
new_config (dict) – new configuration dict
- Returns:
None
config_util.update_config(new_config_dict) config = config_util.get_config()