File size: 704 Bytes
fc6b03c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7f54c11
fc6b03c
 
 
 
 
 
 
 
 
 
 
 
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
"""Minimal end-to-end example.

Set GROQ_API_KEY (free tier at https://console.groq.com/) then:

    python examples/run_eval.py
"""

from pathlib import Path
import sys

ROOT = Path(__file__).resolve().parent.parent
sys.path.insert(0, str(ROOT))

from src import EvalHarness, LLMJudge


def main() -> None:
    harness = EvalHarness(
        model="groq/llama-3.3-70b-versatile",
        dataset=str(ROOT / "datasets" / "example_qa.jsonl"),
        judge=LLMJudge(model="groq/llama-3.1-8b-instant"),
    )
    result = harness.run()
    print(result.summary())
    out = ROOT / "runs" / "example.json"
    result.save(out)
    print(f"\nSerialized run to {out}")


if __name__ == "__main__":
    main()