Download scripts/make_main_lists.py from mverde73/mnemonic-proxy-agentlongbench: direct link, hf CLI and curl.
- Browser
- Download file 2.53 kB
-
https://huggingface.co/datasets/mverde73/mnemonic-proxy-agentlongbench/resolve/main/scripts/make_main_lists.py
- Command line
-
hf download hf://datasets/mverde73/mnemonic-proxy-agentlongbench/scripts/make_main_lists.py
-
curl -L -o make_main_lists.py https://huggingface.co/datasets/mverde73/mnemonic-proxy-agentlongbench/resolve/main/scripts/make_main_lists.py
2.53 kB
| #!/usr/bin/env python3 | |
| """Liste preregistrate della corsa principale AgentLongBench per il post Reddit (16/10/2026, prima di ogni risultato). | |
| Disegno (deciso dal coordinatore dopo il pilota C2, BRIEF/SINTESI in workspaces/proxy-ideas): | |
| - finestra W = 32768 per T/B/D (finestra "piccola" realistica su 12 GB); A = finestra piena (81920 per 64k, 163840 per 128k) | |
| - kf-c (knowledge-free, concise), tool_response, storie 64k (~74K token = 2,3x W) e 128k (~150K = 4,6x W) | |
| - tipi: Count Frequency e Find Duplicates, TUTTE le 25 domande per tipo e lunghezza (100 domande) | |
| - escluso Find Target Offsets: nel pilota A (finestra piena) fa 0/5 (effetto pavimento + quirk dello scorer su | |
| "id1 and id2"): non distingue le politiche. Esclusione dichiarata. | |
| - esclusa E (controllo del meccanismo, gia' nel pilota); proxy D = mnemonic-proxy 0.3.5 b8d4920 (PR #10), cfg D invariata | |
| - confronto principale preregistrato: D contro B (appaiato, McNemar esatto); poi D contro T, tutte contro A. | |
| - domande usate nello sviluppo (riportate anche escluse): 38_i13_j22_a_0031 (diagnosi 0.3.4/0.3.5) | |
| - ordine: per domanda D, B, T (alternando i tipi), poi tutte le A della lunghezza. | |
| """ | |
| import json | |
| import sys | |
| from pathlib import Path | |
| DATA = Path("/mnt/mneme-nvme/proxy-ideas/alb-bench-v2/alb/data/benchmark") | |
| OUT = Path("/mnt/mneme-nvme/proxy-ideas/alb-bench-v2/scripts") | |
| W = 32768 | |
| AW = {"64k": 81920, "128k": 163840} | |
| for L in ("64k", "128k"): | |
| qs = {} | |
| for t in ("count_frequency", "find_duplicates"): | |
| rel = "kf-c/%s/tool_response/%s_tool.jsonl" % (L, t) | |
| qs[t] = [(rel, json.loads(l)["id"] if "id" in json.loads(l) else None, l) for l in open(DATA / rel)] | |
| lines = ["# corsa principale Reddit, lunghezza %s, W=%d (A: %d); 50 domande; vedi docstring di make_main_lists.py" % (L, W, AW[L])] | |
| order = [] | |
| for a, b in zip(qs["count_frequency"], qs["find_duplicates"]): | |
| order += [a, b] | |
| ids = [] | |
| for rel, qid, raw in order: | |
| if qid is None: | |
| d = json.loads(raw) | |
| qid = d.get("qid") or d.get("sample_id") or d.get("uid") | |
| if qid is None: | |
| sys.exit("id della domanda non trovato: chiavi %s" % list(json.loads(raw).keys())[:12]) | |
| ids.append((rel, qid)) | |
| for p in ("D", "B", "T"): | |
| lines.append("%s %d %s %s" % (p, W, rel, qid)) | |
| for rel, qid in ids: | |
| lines.append("A %d %s %s" % (AW[L], rel, qid)) | |
| (OUT / ("main-%s.txt" % L)).write_text("\n".join(lines) + "\n") | |
| print(L, len(ids), "domande,", len(lines) - 1, "lavori") | |