Spaces:
Running
Running
File size: 1,078 Bytes
877add7 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | #!/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()
|