Download scripts/audit.py from jumplander/JumpForge-Agentic-SE-3K: direct link, hf CLI and curl.
- Browser
- Download file 1 kB
-
https://huggingface.co/datasets/jumplander/JumpForge-Agentic-SE-3K/resolve/main/scripts/audit.py
- Command line
-
hf download hf://datasets/jumplander/JumpForge-Agentic-SE-3K/scripts/audit.py
-
curl -L -o audit.py https://huggingface.co/datasets/jumplander/JumpForge-Agentic-SE-3K/resolve/main/scripts/audit.py
1 kB
| #!/usr/bin/env python3 | |
| import hashlib | |
| import json | |
| import re | |
| from collections import Counter | |
| from pathlib import Path | |
| ROOT = Path(__file__).resolve().parents[1] | |
| def norm(text): | |
| text = text.lower() | |
| text = re.sub(r"\b\d+\b", "<n>", text) | |
| text = re.sub(r"[^a-z0-9<> ]+", " ", text) | |
| return re.sub(r"\s+", " ", text).strip() | |
| records = [] | |
| with (ROOT / "data" / "all.jsonl").open(encoding="utf-8") as f: | |
| records = [json.loads(line) for line in f] | |
| ids = [r["id"] for r in records] | |
| requests = [r["scenario"]["user_request"] for r in records] | |
| fingerprints = [r["quality"]["structural_fingerprint"] for r in records] | |
| print("records", len(records)) | |
| print("duplicate_ids", len(ids) - len(set(ids))) | |
| print("duplicate_requests", len(requests) - len(set(requests))) | |
| print("duplicate_normalized_requests", len(requests) - len(set(map(norm, requests)))) | |
| print("duplicate_structural_fingerprints", len(fingerprints) - len(set(fingerprints))) | |
| print("splits", Counter(r["split"] for r in records)) | |