| #!/usr/bin/env python | |
| from __future__ import annotations | |
| import argparse | |
| import sys | |
| from pathlib import Path | |
| PROJECT_ROOT = Path(__file__).resolve().parents[1] | |
| if str(PROJECT_ROOT) not in sys.path: | |
| sys.path.insert(0, str(PROJECT_ROOT)) | |
| from dovla_cil.experiments.reports import generate_eval_report # noqa: E402 | |
| def main(argv: list[str] | None = None) -> int: | |
| parser = argparse.ArgumentParser( | |
| description="Aggregate DoVLA-CIL evaluation metrics into CSV, Markdown, and plots." | |
| ) | |
| parser.add_argument( | |
| "--inputs", | |
| nargs="+", | |
| required=True, | |
| help="One or more metrics.json paths or shell/glob patterns.", | |
| ) | |
| parser.add_argument("--out", type=Path, required=True, help="Report output directory.") | |
| parser.add_argument("--name", default="evaluation_report", help="Experiment name for report.md.") | |
| args = parser.parse_args(argv) | |
| summary = generate_eval_report(args.inputs, args.out, experiment_name=args.name) | |
| print(f"report: {summary['markdown_report']}") | |
| print(f"aggregate_csv: {summary['aggregate_csv']}") | |
| print(f"num runs: {summary['num_runs']}") | |
| return 0 | |
| if __name__ == "__main__": | |
| raise SystemExit(main()) | |