CoolFace
Apppublic

SeaWolf-AI/aether-ad-genesis

sourceHugging Faceapache-2.0updated 5mo agoView on Hugging Face
1likes
evaluate_hit_rate.py31 linesDownload Raw Back to scripts
1"""Compute wow_filter hit-rate from a seeds JSON and write a markdown report."""2 3from __future__ import annotations4 5import argparse6import json7import sys8from pathlib import Path9 10sys.path.insert(0, str(Path(__file__).resolve().parent.parent))11 12from aether_ad.cli.commands import hit_rate_report  # noqa: E40213 14 15def main() -> int:16    p = argparse.ArgumentParser()17    p.add_argument("--input", type=Path, required=True)18    p.add_argument("--report", type=Path, default=Path("outputs/hit_rate_report.md"))19    p.add_argument("--threshold", type=float, default=0.5)20    args = p.parse_args()21    data = json.loads(args.input.read_text(encoding="utf-8"))22    md = hit_rate_report(data, threshold=args.threshold)23    args.report.parent.mkdir(parents=True, exist_ok=True)24    args.report.write_text(md, encoding="utf-8")25    print(f"Wrote {args.report}")26    return 027 28 29if __name__ == "__main__":30    raise SystemExit(main())31