()
| 182 | |
| 183 | |
| 184 | def main() -> int: |
| 185 | args = parse_args() |
| 186 | benchmark_dir = args.benchmark_dir |
| 187 | reports_path = args.reports |
| 188 | if not reports_path.is_absolute() and not reports_path.exists(): |
| 189 | reports_path = benchmark_dir / reports_path |
| 190 | metrics = evaluate_reports(benchmark_dir / "data" / "episodes.jsonl", reports_path) |
| 191 | text = json.dumps(metrics, ensure_ascii=False, indent=2) + "\n" |
| 192 | if args.output: |
| 193 | args.output.parent.mkdir(parents=True, exist_ok=True) |
| 194 | args.output.write_text(text, encoding="utf-8") |
| 195 | print(text, end="") |
| 196 | return 0 |
| 197 | |
| 198 | |
| 199 | if __name__ == "__main__": |
no test coverage detected