xesn.Driver.overwrite_config#
- Driver.overwrite_config(new_config)#
Overwrite specific parameters with the values in the nested dict new_config.
- Parameters:
new_config (dict) – nested dictionary with values to overwrite object’s parameters with
- Sets Attribute:
config (dict): with the nested dictionary based on the input config file
Example
>>> driver = Driver("config.yaml") >>> print(driver.config) {'xdata': {'dimensions': ['x', 'time'], 'zstore_path': 'lorenz96-12d.zarr', ...}, 'esn': {'n_input': 12, 'n_output': 12, 'n_reservoir': 1000, ...}} >>> new_config = {'esn':{'n_reservoir':2000}, 'xdata': {'zstore_path': 'new_data.zarr'}} >>> >>> driver.overwrite_params(new_config) >>> print(driver.config) {'xdata': {'dimensions': ['x', 'time'], 'zstore_path': 'new_data.zarr', ...}, 'esn': {'n_input': 12, 'n_output': 12, 'n_reservoir': 2000, ...}}