train dict | validation dict | test dict |
|---|---|---|
{
"windows": 1191292,
"action_dim": 1,
"pixels_shape": [
4,
3,
224,
224
]
} | {
"windows": 145680,
"action_dim": 1,
"pixels_shape": [
4,
3,
224,
224
]
} | {
"windows": 151002,
"action_dim": 1,
"pixels_shape": [
4,
3,
224,
224
]
} |
TeachingCartpole 10k (v1)
Offscreen-rendered single-pole CartPole episodes (RGB frames, physical state, and the
applied horizontal force) in the stable-worldmodel
HDF5 layout used to train LeWorldModel. Collected for
COMP 765 (McGill) Assignment 1, Q2(e). Models trained on it:
Autobrik/lewm-teaching-cartpole-fs5,
Autobrik/lewm-teaching-cartpole-fs1.
Contents
10,000 episodes, 1,507,974 transitions, split by episode (seed 43):
| File | Episodes | Noisy LQR | Random | Transitions |
|---|---|---|---|---|
train.h5 |
8,000 | 3,989 | 4,011 | 1,207,292 |
validation.h5 |
1,000 | 490 | 510 | 147,680 |
test.h5 |
1,000 | 521 | 479 | 153,002 |
End reasons: 5,679 time limit (200 transitions), 4,321
track/camera bound (|x| ≥ 2.5 m). manifest.json records per-episode seeds,
initial states, policy, split, and end reason, plus physics constants and source hashes.
| HDF5 column | Shape / content |
|---|---|
pixels |
(N, 224, 224, 3) uint8 RGB, fixed camera, gzip |
action |
(N, 1) float32 horizontal force in N, ±10.0 |
observation |
(N, 4) float64 ['x', 'x_dot', 'theta_dot', 'theta'] (m, m/s, rad/s, rad) |
timestamp |
(N,) simulated seconds from reset |
episode_id, terminated, truncated |
per row |
ep_len, ep_offset |
rows and start row of each episode |
- Alignment: action[t] advances observation[t] to observation[t+1]; last is NaN. An episode with T transitions has T+1 rows. Never treat the final NaN as a zero-force action.
- θ = 0 is hanging down, θ = π upright; angles are unwrapped.
- Control at 20 Hz (dt 0.05 s = 10 physics substeps of
0.005 s). Physics: g 9.82, cart M 0.5 kg, pole m 0.5 kg, l 0.5 m,
cart viscous friction b 1.0 N·s/m (force − b·ẋ). Frames are stored at every control step; subsample at load time
with the loader's
frameskip. - Policies: noisy local LQR balancing from near upright (Gaussian force noise σ 0.5 N) and uniform random forces held 2 steps from mixed initial angles. Little swing-up behavior is present.
Loading
import hdf5plugin, stable_worldmodel as swm
from huggingface_hub import snapshot_download
d = snapshot_download("Autobrik/teaching-cartpole-10k-v1", repo_type="dataset")
ds = swm.data.load_dataset(f"{d}/train.h5", frameskip=5, num_steps=4,
keys_to_load=["pixels", "action", "observation"])
Pass an absolute path (a relative one is resolved as a Hub repo id). action and
observation are stored with one-row chunks: reading a whole column at once (e.g. the
loader's keys_to_cache) costs ~8 GB of HDF5 bookkeeping for train.h5. Read them in
slices of ~50k rows instead (identical arrays, <0.5 GB), as the fork's eval_lewm.py does.
Validation
Every episode's structure and boundaries were checked; a physical replay of 10 episodes per
split reproduces the stored states; the stable-worldmodel native reader was checked on the
first/last windows of every split (validation/). Collector: fork BrikHMP18/le-wm, branch
feat/teaching-cartpole-data, commit c628900 (experiments/teaching-cartpole).
- Downloads last month
- -
