Spaces:
Running
Running
| #!/usr/bin/env python3 | |
| """Run complete evaluation bundle.""" | |
| from __future__ import annotations | |
| import json | |
| from pathlib import Path | |
| import sys | |
| ROOT = Path(__file__).resolve().parents[1] | |
| if str(ROOT) not in sys.path: | |
| sys.path.insert(0, str(ROOT)) | |
| from app.evaluation.benchmark_report import build_benchmark_report | |
| from app.evaluation.plotting import generate_training_plots | |
| def main() -> None: | |
| root = Path(__file__).resolve().parents[1] | |
| report = build_benchmark_report(root / "outputs" / "reports" / "benchmark_report.txt") | |
| (root / "outputs" / "reports" / "benchmark_report.json").write_text( | |
| json.dumps(report, ensure_ascii=True, indent=2), encoding="utf-8" | |
| ) | |
| plot_paths = generate_training_plots( | |
| report_dir=root / "outputs" / "reports", | |
| plot_dir=root / "outputs" / "plots", | |
| ) | |
| (root / "outputs" / "reports" / "plot_index.json").write_text( | |
| json.dumps({"plots": plot_paths}, ensure_ascii=True, indent=2), | |
| encoding="utf-8", | |
| ) | |
| print("evaluation_done") | |
| if __name__ == "__main__": | |
| main() | |