Baseline-Arm und Veränderung je Satz #49

Merged
torben merged 6 commits from 26-baseline-arm into main 2026-12-04 22:26:24 +00:00
Showing only changes of commit e9c5913025 - Show all commits
+3 -3
View File
@@ -34,7 +34,7 @@ for _first in "tTfF":
_Loader.yaml_implicit_resolvers = _resolvers
def _read_yaml(path: Path) -> dict[str, Any]:
def read_yaml(path: Path) -> dict[str, Any]:
try:
text = path.read_text(encoding="utf-8-sig")
except FileNotFoundError:
@@ -70,7 +70,7 @@ def _resolve_output_model(spec: str, path: Path) -> type[BaseModel]:
def load_eval_set(directory: Path) -> EvalSet:
spec_path = directory / "eval.yaml"
try:
spec = SetSpec.model_validate(_read_yaml(spec_path), strict=True)
spec = SetSpec.model_validate(read_yaml(spec_path), strict=True)
except ValidationError as exc:
raise EvalSetError(
f"{spec_path}: invalid content: {describe_validation_error(exc)}"
@@ -85,7 +85,7 @@ def load_eval_set(directory: Path) -> EvalSet:
if not stray.name.startswith(".") and stray.suffix != ".yaml":
raise EvalSetError(f"{stray}: case files must end in .yaml")
for case_path in sorted(cases_dir.glob("*.yaml"), key=lambda p: p.stem):
data = _read_yaml(case_path)
data = read_yaml(case_path)
if "id" in data:
raise EvalSetError(f"{case_path}: invalid case: 'id' is the file name, not a field")
try: