mlrl.testbed.util.yml module¶
Author: Michael Rapp (michael.rapp.ml@gmail.com)
Provides utility functions for reading YAML files.
- mlrl.testbed.util.yml.read_and_validate_yaml(yaml_file_path: Path, schema_file_path: Path) dict[Any, Any]¶
Reads and returns the content of a YAML file as a dictionary. The content is validated against a given schema file. If it is malformed, a ValidationError is raised.
- Parameters:
yaml_file_path – The path to a YAML file
schema_file_path – The path to a schema file
- Returns:
The content of the YAML file as a dictionary