(path: str | Path | Sequence[str | Path])
| 238 | |
| 239 | |
| 240 | def load_app_config(path: str | Path | Sequence[str | Path]) -> AppConfig: |
| 241 | paths: list[Path] |
| 242 | if isinstance(path, (str, Path)): |
| 243 | paths = [Path(path)] |
| 244 | else: |
| 245 | paths = [Path(item) for item in path] |
| 246 | |
| 247 | raw: dict[str, Any] = {} |
| 248 | for config_path in paths: |
| 249 | raw = _merge_dicts(raw, _load_merged_yaml(config_path)) |
| 250 | |
| 251 | return AppConfig( |
| 252 | workflow=_build_workflow(_as_mapping(raw.get("workflow", raw.get("psm", {})))), |
| 253 | llm=_build_llm(raw), |
| 254 | optimization=_build_optimization(_as_mapping(raw.get("optimization", {}))), |
| 255 | runtime=_build_runtime(raw), |
| 256 | tools=_build_tools(raw), |
| 257 | paths=_build_paths(_as_mapping(raw.get("paths", {}))), |
| 258 | ) |
no test coverage detected