Codex
Replace the dataset with the current testing tree and the three UT docs.
d26f22a
Raw History Blame Contribute Delete
721 Bytes
"""Typed report input shared by persisted and in-memory experiments."""
from __future__ import annotations
from dataclasses import dataclass
from typing import Any, Mapping
from ..models import ScoreRecord, TaskArtifact, deep_thaw, score_statistics
@dataclass(frozen=True)
class ReportData:
"""Source-neutral report input; callers own assembly and deserialization."""
experiment_id: str
runs: tuple[TaskArtifact, ...]
scores: tuple[ScoreRecord, ...]
inputs: Mapping[str, Any]
backend: Mapping[str, Any]
def summary(self) -> dict[str, Any]:
return {"inputs": deep_thaw(self.inputs), "backend": deep_thaw(self.backend),
"evaluation": score_statistics(self.scores)}