direct_data_driven_mpc.utilities.yaml_config_loading

direct_data_driven_mpc.utilities.yaml_config_loading#

Utility for loading configuration parameters from YAML files.

This module provides a function for loading parameters for specified keys from YAML configuration files.

Functions

load_yaml_config_params(config_file, key)

Load and retrieve parameters from a YAML configuration file for a specified key.

load_yaml_config_params(config_file: str, key: str) Any[source]#

Load and retrieve parameters from a YAML configuration file for a specified key.

Parameters:
  • config_file (str) – The path to a YAML configuration file.

  • key (str) – The key corresponding to the parameters to be retrieved from the configuration file.

Returns:

Any – The parameters from the configuration file associated with the specified key.

Raises:
  • FileNotFoundError – If the YAML configuration file is not found.

  • ValueError – If the key value is missing in the configuration file.