Spaces:
Running
Running
SooryaKiranKakkarayil
Day 6: fix batch2 labels, fix LLM-judge verdict bug, add pass_k and rpd diagnostic scripts
6b6557c Download eval/inspect_rows.py from SooryaKi/ScamSentry: direct link, hf CLI and curl.
- Browser
- Download file 865 Bytes
-
https://huggingface.co/spaces/SooryaKi/ScamSentry/resolve/main/eval/inspect_rows.py
- Command line
-
hf download hf://spaces/SooryaKi/ScamSentry/eval/inspect_rows.py
-
curl -L -o inspect_rows.py https://huggingface.co/spaces/SooryaKi/ScamSentry/resolve/main/eval/inspect_rows.py
865 Bytes
| """ | |
| eval/inspect_rows.py | |
| One-off diagnostic: dump full raw records for specific row ids from both | |
| golden_eval_results.jsonl and golden_sample.csv, to inspect the row_0060/ | |
| row_0061 hallucination flagged by LLM-as-Judge. | |
| """ | |
| import json | |
| import csv | |
| TARGET_IDS = {"row_0060", "row_0061"} | |
| print("=== golden_eval_results.jsonl ===") | |
| with open("eval/golden_eval_results.jsonl", encoding="utf-8") as f: | |
| for line in f: | |
| row = json.loads(line) | |
| if row.get("id") in TARGET_IDS: | |
| print(json.dumps(row, indent=2, ensure_ascii=False)) | |
| print("---") | |
| print("\n=== golden_sample.csv ===") | |
| with open("eval/golden_sample.csv", encoding="utf-8") as f: | |
| for row in csv.DictReader(f): | |
| if row["id"] in TARGET_IDS: | |
| print(f"{row['id']} | label: {row['label']}") | |
| print(row["text"][:300]) | |
| print("---") |