denspp.offline.yaml_handler#

Module Contents#

Classes#

API#

class denspp.offline.yaml_handler.YamlHandler(template: Any | dict, path: str = 'config', file_name: str = 'Config_Train')[source]#

Initialization

Creating a class for handling YAML files

Parameters:
  • template – Dummy dataclass with entries or dictionary (is only generated if YAML not exist)

  • path – String with path to the folder which has the YAML file [Default: ‘’]

  • file_name – String with name of the YAML file [Default: ‘Config_Train’]

write_dict_to_yaml(config_data: dict, print_output: bool = False) None[source]#

Writing list with configuration sets to YAML file Args: config_data: Dict. with configuration print_output: Printing the data in YAML format Returns: None

get_dict() dict[source]#

Getting the dictionary with configuration sets from YAML file

Returns:

Dict. with configuration

get_class(class_constructor: type)[source]#

Getting all key inputs from yaml dictionary to a class

Returns:

Settings in specified dataclass