Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
|
@@ -33,3 +33,95 @@ configs:
|
|
| 33 |
- split: train
|
| 34 |
path: data/train-*
|
| 35 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 33 |
- split: train
|
| 34 |
path: data/train-*
|
| 35 |
---
|
| 36 |
+
# SlimeBench
|
| 37 |
+
|
| 38 |
+
SlimeBench measures offline imitation of a deterministic SlimeVolley controller.
|
| 39 |
+
It contains 64 rows, each with 2,048 training and 100 test conversations. Each
|
| 40 |
+
conversation comes from a different independently seeded, complete rollout:
|
| 41 |
+
137,472 rollouts total, with disjoint seeds across every row and split.
|
| 42 |
+
|
| 43 |
+
A conversation contains only a user message with a bracketed list of 12 numbers
|
| 44 |
+
and an assistant message with one letter from `A` through `F`. There are no feature
|
| 45 |
+
names, action descriptions, or system messages. Each row has its own random
|
| 46 |
+
permutation of observation coordinates and assignment of the six effective actions
|
| 47 |
+
to letters. Both mappings are fixed within the row and distinct across all rows.
|
| 48 |
+
The public columns are `row_id`, `num_train`, `num_test`, `train_data`, `test_data`;
|
| 49 |
+
the latter two contain lists of two-message conversations.
|
| 50 |
+
|
| 51 |
+
## Teacher and sampling
|
| 52 |
+
|
| 53 |
+
The teacher is the upstream feedforward CMA-ES policy, using the original
|
| 54 |
+
`zoo/cmaes/slimevolley.cma.64.96.best.json` weights. It plays against the built-in
|
| 55 |
+
recurrent `BaselinePolicy`. Both simulator and opponent state are reset for each
|
| 56 |
+
rollout; upstream `env.reset()` alone does not reset the opponent's recurrent state.
|
| 57 |
+
The pinned upstream revision is `8ac22434fc5a587a3395311f7854aeda17d10303`:
|
| 58 |
+
[environment](https://github.com/hardmaru/slimevolleygym/blob/8ac22434fc5a587a3395311f7854aeda17d10303/slimevolleygym/slimevolley.py),
|
| 59 |
+
[feedforward policy](https://github.com/hardmaru/slimevolleygym/blob/8ac22434fc5a587a3395311f7854aeda17d10303/slimevolleygym/mlp.py).
|
| 60 |
+
SlimeVolleyGym is distributed under Apache-2.0.
|
| 61 |
+
|
| 62 |
+
The policy receives float32 observations, serialized with nine significant digits
|
| 63 |
+
so every input round-trips exactly. Positive network outputs press the three
|
| 64 |
+
buttons; simultaneous forward/backward presses cancel, leaving six effective
|
| 65 |
+
actions. These are mapped to letters without changing the rollout dynamics.
|
| 66 |
+
Every published label is recomputed from its serialized input before upload.
|
| 67 |
+
|
| 68 |
+
Reservoir sampling selects one timestep uniformly within each complete rollout,
|
| 69 |
+
including games that reach the 3,000-step limit. No action balancing, win filtering,
|
| 70 |
+
or loss filtering is performed. Thus the dataset preserves the teacher's natural
|
| 71 |
+
action frequencies under this episode-uniform sampling scheme; it does not weight
|
| 72 |
+
longer episodes more heavily. Sampled conversations are shuffled within each split.
|
| 73 |
+
|
| 74 |
+
Accuracy measures agreement with this teacher, not optimality or closed-loop
|
| 75 |
+
playing strength. Natural action frequencies can be highly imbalanced: report
|
| 76 |
+
majority-class baselines when interpreting accuracy. Hidden random action mappings
|
| 77 |
+
give expected zero-example accuracy of 1/6 over mappings, assuming the evaluator
|
| 78 |
+
receives no mapping information. They do not make every finite row balanced.
|
| 79 |
+
|
| 80 |
+
## Reproduce
|
| 81 |
+
|
| 82 |
+
The [generator](./slime_bench.py) uses an isolated legacy
|
| 83 |
+
Gym environment; it does not modify the training environment. From the outer-loop
|
| 84 |
+
repository root:
|
| 85 |
+
|
| 86 |
+
```bash
|
| 87 |
+
uv venv --python 3.11 /tmp/slimebench-venv
|
| 88 |
+
uv pip install --python /tmp/slimebench-venv/bin/python \
|
| 89 |
+
numpy==1.26.4 gym==0.23.1 opencv-python-headless==4.10.0.84 \
|
| 90 |
+
datasets==4.4.1 pyarrow==21.0.0 huggingface-hub==0.36.0 python-dotenv==1.2.4
|
| 91 |
+
git clone https://github.com/hardmaru/slimevolleygym.git /tmp/slimebench-upstream
|
| 92 |
+
git -C /tmp/slimebench-upstream checkout 8ac22434fc5a587a3395311f7854aeda17d10303
|
| 93 |
+
OPENBLAS_NUM_THREADS=1 /tmp/slimebench-venv/bin/python \
|
| 94 |
+
data_preparation/benchmarks/slime_bench.py \
|
| 95 |
+
--source-dir /tmp/slimebench-upstream \
|
| 96 |
+
--output-dir local_data/slime_bench --workers 32 --upload
|
| 97 |
+
```
|
| 98 |
+
|
| 99 |
+
The default upload destination is `aklein4/SlimeBench`, configuration `default`,
|
| 100 |
+
split `train`. The 64 outer rows are uploaded together; the support/test distinction
|
| 101 |
+
is within each row. Authentication uses the existing Hugging Face login or `HF_TOKEN`.
|
| 102 |
+
Use `--rows 2 --num-train 16 --num-test 8 --workers 2` and a different output directory
|
| 103 |
+
without `--upload` for a smoke test.
|
| 104 |
+
|
| 105 |
+
Completed rows are checkpointed and reused on reruns with the same source and
|
| 106 |
+
generation settings. Worker count can change on resume. Local checkpoints contain
|
| 107 |
+
the private permutations, original observations, rollout seeds, sampled timesteps,
|
| 108 |
+
and episode returns; these must not be exposed as model inputs and are not uploaded.
|
| 109 |
+
The output directory also contains `slime_bench.jsonl`, `manifest.json`,
|
| 110 |
+
`validation.json`, and (after publication) `upload.json`.
|
| 111 |
+
|
| 112 |
+
Load conversations with:
|
| 113 |
+
|
| 114 |
+
```python
|
| 115 |
+
from datasets import load_dataset
|
| 116 |
+
rows = load_dataset("aklein4/SlimeBench", split="train")
|
| 117 |
+
support = rows[0]["train_data"]
|
| 118 |
+
test = rows[0]["test_data"]
|
| 119 |
+
```
|
| 120 |
+
|
| 121 |
+
## Published run
|
| 122 |
+
|
| 123 |
+
- 137,472 conversations from distinct rollouts.
|
| 124 |
+
- Mean teacher rollout return: 1.1126.
|
| 125 |
+
- Exact train/test prompt overlaps within rows: 0.
|
| 126 |
+
- Generation seed: 42.
|
| 127 |
+
- JSONL SHA-256: `b04fabf11357dc0c63b307e6799a0d4d58b35c08539c06718cbd4aa675b35242`.
|