File size: 947 Bytes
d082ced
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4b79970
 
 
 
 
 
 
d082ced
 
 
 
 
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
"""Render the v0 eval report from the trained-results JSON + training table."""
from __future__ import annotations

from microbe_model import config
from microbe_model.eval import render_report


def main() -> None:
    results_path = config.ARTIFACTS / "baseline_results.json"
    dataset_path = config.DATA / "training_table.parquet"
    out_path = config.ARTIFACTS / "eval_report.md"

    if not results_path.exists():
        raise SystemExit(f"Missing {results_path}. Run scripts/03_train_baseline.py first.")
    if not dataset_path.exists():
        raise SystemExit(f"Missing {dataset_path}. Run scripts/03_train_baseline.py first.")

    predictions_path = config.ARTIFACTS / "predictions.parquet"
    render_report(
        results_path,
        dataset_path,
        out_path,
        predictions_path=predictions_path if predictions_path.exists() else None,
    )
    print(f"Wrote {out_path}")


if __name__ == "__main__":
    main()