Download examples/run_eval.py from TensorVizion/agent-eval-harness: direct link, hf CLI and curl.
- Browser
- Download file 704 Bytes
-
https://huggingface.co/spaces/TensorVizion/agent-eval-harness/resolve/main/examples/run_eval.py
- Command line
-
hf download hf://spaces/TensorVizion/agent-eval-harness/examples/run_eval.py
-
curl -L -o run_eval.py https://huggingface.co/spaces/TensorVizion/agent-eval-harness/resolve/main/examples/run_eval.py
704 Bytes
| """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() | |