Download recheck_select.py from mlboydaisuke/coreai-decision-models-public231: direct link, hf CLI and curl.
- Browser
- Download file 1.35 kB
-
https://huggingface.co/datasets/mlboydaisuke/coreai-decision-models-public231/resolve/main/recheck_select.py
- Command line
-
hf download hf://datasets/mlboydaisuke/coreai-decision-models-public231/recheck_select.py
-
curl -L -o recheck_select.py https://huggingface.co/datasets/mlboydaisuke/coreai-decision-models-public231/resolve/main/recheck_select.py
1.35 kB
| #!/usr/bin/env python3 | |
| """Deterministic 30-row subset of the public 231 for a solo re-check of contended runs: | |
| easy 10 (every 5th by id order), original 10 (4 choice, 4 noul, 2 score, spread by id), hard 10 by state length | |
| (5 around the median, 3 at the 75–90th percentile, 2 longest). Records are copied unchanged.""" | |
| import json, os, sys | |
| root = os.path.expanduser('~/code/jevbench/datasets/public') | |
| def load(t): return [json.loads(l) for l in open(f'{root}/{t}.jsonl') if l.strip()] | |
| out = [] | |
| easy = sorted(load('easy'), key=lambda r: r['id']); out += easy[::5][:10] | |
| orig = sorted(load('original'), key=lambda r: r['id']) | |
| for ty, k in (('choice', 4), ('noul', 4), ('score', 2)): | |
| rows = [r for r in orig if r['question']['type'] == ty]; step = max(1, len(rows) // k); out += rows[::step][:k] | |
| hard = sorted(load('hard'), key=lambda r: len(r['state'])); n = len(hard) | |
| idx = [n // 2 - 2, n // 2 - 1, n // 2, n // 2 + 1, n // 2 + 2, int(n * .75), int(n * .82), int(n * .9), n - 2, n - 1] | |
| out += [hard[i] for i in idx] | |
| seen = set(); dst = sys.argv[1] if len(sys.argv) > 1 else 'recheck30.jsonl' | |
| with open(dst, 'w') as fh: | |
| for r in out: | |
| if r['id'] in seen: continue | |
| seen.add(r['id']); fh.write(json.dumps(r, ensure_ascii=False) + '\n') | |
| print(dst, len(seen), 'rows;', 'hard state chars:', [len(hard[i]['state']) for i in idx]) | |