Datasets:
Download scripts/rung_reset.py from DrumsRL/drums-benchmarks: direct link, hf CLI and curl.
- Browser
- Download file 958 Bytes
-
https://huggingface.co/datasets/DrumsRL/drums-benchmarks/resolve/main/scripts/rung_reset.py
- Command line
-
hf download hf://datasets/DrumsRL/drums-benchmarks/scripts/rung_reset.py
-
curl -L -o rung_reset.py https://huggingface.co/datasets/DrumsRL/drums-benchmarks/resolve/main/scripts/rung_reset.py
958 Bytes
| """rung_reset.py ANALYZE_PY RAW_RUN_DIR [arm:n ...] -> JSON: per-rung reset p50/p99 with the bootstrap CI of analyze.py. | |
| Uses analyze.py's own rung_stats() (pass 1, same seed handling) so the definition is exactly the T1 report's. | |
| Default rungs: drums-api:32 osworld-docker:16 (the original operating points of claim C1).""" | |
| import importlib.util, json, random, sys | |
| spec = importlib.util.spec_from_file_location("an", sys.argv[1]); an = importlib.util.module_from_spec(spec); spec.loader.exec_module(an) | |
| raw = sys.argv[2]; pairs = sys.argv[3:] or ["drums-api:32", "osworld-docker:16"] | |
| out = {} | |
| for p in pairs: | |
| arm, n = p.split(":"); rng = random.Random(20261108) | |
| s = an.rung_stats(raw, arm, "p1", int(n), 4.44544, rng) | |
| out[p] = None if s is None else {k: s[k] for k in ("n", "rollouts", "valid", "wall_s", "reset_n", "reset_p50_s", "reset_p50_ci", "reset_p99_s", "reset_p99_ci", "invalid_rate", "valid_per_usd")} | |
| print(json.dumps(out, indent=1)) | |