diff --git a/openagent_eval/reports/manager.py b/openagent_eval/reports/manager.py index 3db3c42..bb47a6e 100644 --- a/openagent_eval/reports/manager.py +++ b/openagent_eval/reports/manager.py @@ -169,10 +169,18 @@ def reconstruct(data: dict[str, Any]) -> EvaluationReport: This is useful when loading a report and passing it to report generators that expect the full dataclass. + + Raises: + ValueError: If the ``config`` section is missing from the data. """ from openagent_eval.config.models import Config - config = Config(**data.get("config", {})) + config = data.get("config") + if not config: + raise ValueError( + "Cannot reconstruct EvaluationReport: 'config' section is missing from data" + ) + config = Config(**config) results = [ EvaluationResult(