MCPcopy Create free account
hub / github.com/ScaleML/AgentSPEX / save_eval_summary

Function save_eval_summary

src/benchmarks/chembench/evaluate.py:287–305  ·  view source on GitHub ↗

Save evaluation summary to output_dir/evals/evaluation_summary.json. Args: eval_summary: Evaluation summary dict. output_dir: Base output directory. Returns: Path to the saved file.

(
    eval_summary: dict[str, Any],
    output_dir: str | Path,
)

Source from the content-addressed store, hash-verified

285
286
287def save_eval_summary(
288 eval_summary: dict[str, Any],
289 output_dir: str | Path,
290) -> Path:
291 """Save evaluation summary to output_dir/evals/evaluation_summary.json.
292
293 Args:
294 eval_summary: Evaluation summary dict.
295 output_dir: Base output directory.
296
297 Returns:
298 Path to the saved file.
299 """
300 eval_dir = Path(output_dir) / "evals"
301 eval_dir.mkdir(parents=True, exist_ok=True)
302 eval_path = eval_dir / "evaluation_summary.json"
303 with eval_path.open("w") as f:
304 json.dump(eval_summary, f, indent=2, ensure_ascii=False)
305 return eval_path
306
307
308def print_summary(eval_summary: dict[str, Any]) -> None:

Callers 2

mainFunction · 0.90
mainFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected