MCPcopy Index your code
hub / github.com/FinancialComputingUCL/LOBFrame / load_yaml

Function load_yaml

utils.py:14–27  ·  view source on GitHub ↗

Load a YAML file. Args: path (str): Path to the YAML file. subsection (str): Subsection to be considered (i.e. general, model, trading). Returns: A dictionary containing the YAML file.

(path: str, subsection: str)

Source from the content-addressed store, hash-verified

12
13
14def load_yaml(path: str, subsection: str) -> dict[str, Any]:
15 """
16 Load a YAML file.
17
18 Args:
19 path (str): Path to the YAML file.
20 subsection (str): Subsection to be considered (i.e. general, model, trading).
21
22 Returns:
23 A dictionary containing the YAML file.
24 """
25 with open(path) as f:
26 config = yaml.safe_load(f)
27 return config[subsection]
28
29
30def data_split(

Callers 1

main.pyFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected