Download tools/show_judge.py from RightNowAI/duplex-v0: direct link, hf CLI and curl.
- Browser
- Download file 992 Bytes
-
https://huggingface.co/RightNowAI/duplex-v0/resolve/main/tools/show_judge.py
- Command line
-
hf download hf://RightNowAI/duplex-v0/tools/show_judge.py
-
curl -L -o show_judge.py https://huggingface.co/RightNowAI/duplex-v0/resolve/main/tools/show_judge.py
992 Bytes
| """One line per judge variant from eval/results/judge/judge.json. | |
| python -m tools.show_judge eval/results/judge/judge.json | |
| """ | |
| import json | |
| import sys | |
| def f(x): | |
| return f"{x['correct']}/{x['total']} ({x['rate']:.3f})" if x["total"] else "none" | |
| d = json.load(open(sys.argv[1])) | |
| print(d["cases"], d["held_out_pauses"], "| chosen on train:", d["chosen_on_train"]) | |
| for v, r in d["variants"].items(): | |
| h, b = r["held_out"], r["benchmark_questions"] | |
| print(f"{v:7s} train balanced {r['train_balanced_accuracy']:.3f} | turn end released {f(h['turn_end_released'])} | pause held: all {f(h['pause_held_all'])}" | |
| f", cut off {f(h['pause_held_cut_off'])}, other {f(h['pause_held_other'])} | question inner held {f(b['inner_silence_held'])}" | |
| f", end released {f(b['end_released'])}, never early {b['questions_never_released_early']}/100" | |
| f" | ms p50 {r['judge_ms_held_out']['p50']:.0f} p90 {r['judge_ms_held_out']['p90']:.0f} | no word {r['no_answer_word']}") | |