EvSys

yaml_loader

YAML <-> ExperimentConfig.

The YAML is canonical - Python builders just emit the same dict tree.

Validation has two layers:

  1. Top-level structure validated by ExperimentConfig (Pydantic, strict).
  2. Each kind: block has its params: 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) -> ExperimentConfig

Parse and validate a YAML experiment file.

paramsourcestr | Path | dict[str, Any]

Returns

evsys_sdk.config.ExperimentConfig
funcdump_yaml(cfg, *, path=None) -> str

Serialize an ExperimentConfig back to YAML.

paramcfgExperimentConfig
parampathstr | Path | None
= None

Returns

str
funcvalidate_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
= False

Returns

list[str]
func_expand_matrix(cfg) -> ExperimentConfig

Replace cfg.matrix with cfg.runs, preserving everything else.

paramcfgExperimentConfig

Returns

evsys_sdk.config.ExperimentConfig