Apievsys_sdk
yaml_loader
YAML <-> ExperimentConfig.
The YAML is canonical - Python builders just emit the same dict tree.
Validation has two layers:
- Top-level structure validated by ExperimentConfig (Pydantic, strict).
- Each
kind:block has itsparams:validated against the registered extension's .Config model.
Step 2 happens lazily inside the runner (on actual use) so unknown extensions
discovered via entry points don't fail validation prematurely. But you can
call validate_yaml(path, *, deep=True) to force step 2 up front.
func_read_yaml(source) -> dict[str, Any]paramsourcestr | Path | dict[str, Any]Returns
dict[str, typing.Any]funcload_yaml(source) -> ExperimentConfigParse and validate a YAML experiment file.
paramsourcestr | Path | dict[str, Any]Returns
evsys_sdk.config.ExperimentConfigfuncdump_yaml(cfg, *, path=None) -> strSerialize an ExperimentConfig back to YAML.
paramcfgExperimentConfigparampathstr | Path | None= NoneReturns
strfuncvalidate_yaml(source, *, deep=False) -> list[str]Return a list of validation errors. Empty list = valid.
If deep is True, also validate every kind/params block against its
registered .Config model.
paramsourcestr | Path | dict[str, Any]paramdeepbool= FalseReturns
list[str]func_expand_matrix(cfg) -> ExperimentConfigReplace cfg.matrix with cfg.runs, preserving everything else.
paramcfgExperimentConfigReturns
evsys_sdk.config.ExperimentConfig