Download scripts/make_clar.py from mverde73/mnemonic-proxy-agentlongbench: direct link, hf CLI and curl.
- Browser
- Download file 2.07 kB
-
https://huggingface.co/datasets/mverde73/mnemonic-proxy-agentlongbench/resolve/main/scripts/make_clar.py
- Command line
-
hf download hf://datasets/mverde73/mnemonic-proxy-agentlongbench/scripts/make_clar.py
-
curl -L -o make_clar.py https://huggingface.co/datasets/mverde73/mnemonic-proxy-agentlongbench/resolve/main/scripts/make_clar.py
2.07 kB
| #!/usr/bin/env python3 | |
| """Corsa di conferma (preregistrata 17/10/2026, MAIN-RUN-CONFIRM.md): stesse 100 domande della corsa principale, con la | |
| domanda resa non ambigua. Il banco intende "tool results for round N" come l'uscita dello strumento che PRECEDE il | |
| messaggio "Round N: Guess ..." (verificato su 100/100 risposte ufficiali); la domanda lo dice ora esplicitamente. | |
| Risposte ufficiali e scorer invariati. Crea alb-clar/ (dati con la nota, src condiviso) e le liste main-clar-*.txt.""" | |
| import json | |
| import os | |
| from pathlib import Path | |
| B = Path("/mnt/mneme-nvme/proxy-ideas/alb-bench-v2") | |
| SRC = B / "alb/data/benchmark" | |
| DST = B / "alb-clar/data/benchmark" | |
| NOTE = (" Note: in this dialogue, \"the tool results for round N\" means the tool output that appears just BEFORE the" | |
| " user message \"Round N: Guess ...\" (the result of the query made for the guess of round N), not the one" | |
| " after it.") | |
| (B / "alb-clar").mkdir(exist_ok=True) | |
| if not (B / "alb-clar/src").exists(): | |
| os.symlink("../alb/src", B / "alb-clar/src") | |
| for L in ("64k", "128k"): | |
| for t in ("count_frequency", "find_duplicates"): | |
| rel = Path("kf-c/%s/tool_response/%s_tool.jsonl" % (L, t)) | |
| (DST / rel).parent.mkdir(parents=True, exist_ok=True) | |
| n = 0 | |
| with open(SRC / rel) as fi, open(DST / rel, "w") as fo: | |
| for line in fi: | |
| r = json.loads(line) | |
| assert "round" in r["question"], r["question"] | |
| r["question"] = r["question"].rstrip() + NOTE | |
| fo.write(json.dumps(r, ensure_ascii=False) + "\n") | |
| n += 1 | |
| print(rel, n) | |
| src = (B / ("scripts/main-%s.txt" % L)).read_text().splitlines() | |
| out = ["# CONFERMA (domanda non ambigua, MAIN-RUN-CONFIRM.md); dati in alb-clar/; stesse righe di main-%s.txt" % L] | |
| out += [l for l in src if l and not l.startswith("#")] | |
| (B / ("scripts/main-clar-%s.txt" % L)).write_text("\n".join(out) + "\n") | |
| print("esempio:", json.loads(open(DST / "kf-c/64k/tool_response/count_frequency_tool.jsonl").readline())["question"]) | |