ruoxi_sun 58657935fc bundle fingerprint tool repos into evalstone for self-containment
Vendor LLMmap / llm-verify / llm-fingerprint-detector under
bash/fingerprint/tools so the three fingerprint benchmarks run with only
/data1/eval mounted (no /data1/xii dependency):
- run.py DEFAULT_TOOLS_ROOT prefers builtin tools/, falls back to /data1/xii
- exclude .git / node_modules / template backups
- detector dist/ (pre-built) retained; node_modules not needed at runtime
2026-09-03 06:45:46 +00:00

32 lines
861 B
Python

"""Quick script to view benchmark results."""
import httpx
import json
import sys
RUN_ID = sys.argv[1] if len(sys.argv) > 1 else "5f633956-040d-40e6-bd17-3b47be57f9a8"
BASE = "http://127.0.0.1:8001"
r = httpx.get(f"{BASE}/api/v1/results/{RUN_ID}")
results = r.json()
for i, res in enumerate(results, 1):
sep = "=" * 80
prompt = res["prompt_text"][:120]
response = res["response_text"][:600]
latency = res["latency_ms"] or 0
in_tok = res["prompt_tokens"]
out_tok = res["completion_tokens"]
err = res["error_message"]
print(f"\n{sep}")
print(f"PROBE #{i}")
print(f"PROMPT: {prompt}...")
print(f"RESPONSE:\n{response}")
print(f"\nLATENCY: {latency:.0f}ms | IN: {in_tok} | OUT: {out_tok}")
if err:
print(f"ERROR: {err[:200]}")
print(f"\n{'=' * 80}")
print(f"TOTAL: {len(results)} probes completed")