Datasets:
Update README.md
Browse files
README.md
CHANGED
|
@@ -1,3 +1,141 @@
|
|
| 1 |
---
|
| 2 |
license: mit
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
license: mit
|
| 3 |
+
task_categories:
|
| 4 |
+
- reinforcement-learning
|
| 5 |
+
tags:
|
| 6 |
+
- reinforcement-learning
|
| 7 |
+
- physics
|
| 8 |
+
- offline-rl
|
| 9 |
+
- behaviour-cloning
|
| 10 |
+
- jax
|
| 11 |
+
- procedural-generation
|
| 12 |
+
size_categories:
|
| 13 |
+
- 1B<n<10B
|
| 14 |
---
|
| 15 |
+
|
| 16 |
+
# Kinetix-Offline
|
| 17 |
+
|
| 18 |
+
**3 billion expert transitions across 11 million unique physics-based tasks.**
|
| 19 |
+
|
| 20 |
+
<p align="center">
|
| 21 |
+
<a href="https://arxiv.org/abs/2410.23208"><img src="https://img.shields.io/badge/arxiv-2410.23208-b31b1b" /></a>
|
| 22 |
+
<a href="https://github.com/FLAIROx/Kinetix"><img src="https://img.shields.io/badge/code-FLAIROx%2FKinetix-black" /></a>
|
| 23 |
+
<a href="https://kinetix-env.github.io/dataset"><img src="https://img.shields.io/badge/blog-Kinetix%2010M-blue" /></a>
|
| 24 |
+
</p>
|
| 25 |
+
|
| 26 |
+
## Overview
|
| 27 |
+
|
| 28 |
+
This dataset contains offline expert trajectories collected in [Kinetix](https://kinetix-env.github.io/), a JAX-based 2D rigid-body physics environment where tasks are procedurally generated. Every task shares the same goal: make the **green** and **blue** objects touch, without **green** touching **red**. The agent acts by applying torques via motors and forces via thrusters.
|
| 29 |
+
|
| 30 |
+
Specialist PPO agents were trained independently per procedurally generated task (i.e., level), and only successful trajectories from solvable levels are included (~50% of all generated levels are solvable).
|
| 31 |
+
|
| 32 |
+
We have ~3B transitions from over 11M unique tasks.
|
| 33 |
+
## Dataset Splits
|
| 34 |
+
|
| 35 |
+
Datasets are named `{policy_steps}/{size}`, where `policy_steps` is the number of RL training steps used per specialist agent and `size` is the environment complexity (`s`mall, `m`edium, `l`arge).
|
| 36 |
+
|
| 37 |
+
| Expert Training Steps | Size | Unique Levels | Transitions | Size on Disk |
|
| 38 |
+
|---|---|---|---|---|
|
| 39 |
+
| `1M` | `s` | 5.98M | 1.53B | 123 GB |
|
| 40 |
+
| `1M` | `m` | 3.45M | 884M | 98 GB |
|
| 41 |
+
| `1M` | `l` | 1.05M | 268M | 82 GB |
|
| 42 |
+
| `10M` | `s` | 637k | 163M | 12 GB |
|
| 43 |
+
| `10M` | `m` | 422k | 108M | 11 GB |
|
| 44 |
+
| **Total** | | **11.5M** | **~3B** | **326 GB** |
|
| 45 |
+
|
| 46 |
+
## Data Format
|
| 47 |
+
|
| 48 |
+
Data is stored as [zarr](https://zarr.readthedocs.io/) archives. Each batch has shape `(batch_size, T, *dims)` with T=256 and is returned as an `ActionEnvStateMask` object:
|
| 49 |
+
|
| 50 |
+
| Field | Shape | Description |
|
| 51 |
+
|---|---|---|
|
| 52 |
+
| `action` | `(B, T, A)` | Expert action at each timestep |
|
| 53 |
+
| `env_state` | `(B, T, ...)` | Full simulator state (use to re-render in any modality) |
|
| 54 |
+
| `action_mask` | `(B, T, A)` | Which action dimensions are active (motors/thrusters present in this level) |
|
| 55 |
+
| `done` | `(B, T)` | Episode termination flags |
|
| 56 |
+
| `mask` | `(B, T)` | Always `True` — dataset contains only successful trajectories |
|
| 57 |
+
|
| 58 |
+
Because the full `env_state` is stored, you can render observations at training time in any modality (symbolic graph or pixels) without storing raw frames.
|
| 59 |
+
|
| 60 |
+
## Usage
|
| 61 |
+
|
| 62 |
+
### Downloading
|
| 63 |
+
|
| 64 |
+
```bash
|
| 65 |
+
# Entire dataset (~326 GB)
|
| 66 |
+
hf download mbeukman/Kinetix-Offline --repo-type dataset --local-dir ./data
|
| 67 |
+
|
| 68 |
+
# Single split, e.g. medium-size 1M-step experts (~98 GB)
|
| 69 |
+
hf download mbeukman/Kinetix-Offline --repo-type dataset --local-dir ./data --include "1M/m/*"
|
| 70 |
+
|
| 71 |
+
# Single split, e.g. medium-size 10M-step experts (~11 GB)
|
| 72 |
+
hf download mbeukman/Kinetix-Offline --repo-type dataset --local-dir ./data --include "10M/m/*"
|
| 73 |
+
```
|
| 74 |
+
|
| 75 |
+
Replace `1M/m` with any `{policy_steps}/{size}` combination from the table above.
|
| 76 |
+
|
| 77 |
+
### Loading Data
|
| 78 |
+
|
| 79 |
+
```python
|
| 80 |
+
from kinetix.data import TrajectoryDatasetManager
|
| 81 |
+
|
| 82 |
+
traj_manager = TrajectoryDatasetManager(
|
| 83 |
+
dataset_dir="/path/to/traj_data",
|
| 84 |
+
batch_size=64, # number of trajectories per batch
|
| 85 |
+
)
|
| 86 |
+
batch = traj_manager.load_next_batch() # shape (64, T, *dims)
|
| 87 |
+
```
|
| 88 |
+
|
| 89 |
+
See [`examples/example_data_loading.py`](https://github.com/FLAIROx/Kinetix/blob/main/examples/example_data_loading.py) for a full runnable example including GIF rendering.
|
| 90 |
+
|
| 91 |
+
### Rendering Pixel Observations
|
| 92 |
+
|
| 93 |
+
Because the raw environment state is stored, you can render frames in any observation modality at training time without storing raw pixels:
|
| 94 |
+
|
| 95 |
+
```python
|
| 96 |
+
import jax
|
| 97 |
+
from kinetix.environment import EnvParams, static_env_params_from_size
|
| 98 |
+
from kinetix.render import make_render_pixels
|
| 99 |
+
|
| 100 |
+
static_env_params = static_env_params_from_size("m") # match your downloaded split
|
| 101 |
+
renderer = jax.jit(make_render_pixels(EnvParams(), static_env_params))
|
| 102 |
+
|
| 103 |
+
# Render a full batch of trajectories: (B, T, H, W, C)
|
| 104 |
+
frames = jax.vmap(jax.vmap(renderer))(batch.env_state)
|
| 105 |
+
```
|
| 106 |
+
|
| 107 |
+
### Behaviour Cloning
|
| 108 |
+
|
| 109 |
+
A full BC training script is included in the Kinetix repository:
|
| 110 |
+
|
| 111 |
+
```bash
|
| 112 |
+
python3 experiments/offline_bc.py dataset_dir=/path/to/data env_size=m
|
| 113 |
+
```
|
| 114 |
+
|
| 115 |
+
Configuration lives in [`configs/offline_bc.yaml`](https://github.com/FLAIROx/Kinetix/blob/main/configs/offline_bc.yaml).
|
| 116 |
+
|
| 117 |
+
## Why Use This Dataset?
|
| 118 |
+
|
| 119 |
+
**Massive task diversity**: With 10M+ unique levels, this dataset makes it possible to study how offline agent performance scales with task diversity, and what challenges emerge when learning across millions of tasks.
|
| 120 |
+
|
| 121 |
+
**Dynamic rendering**: Raw environment state is stored rather than pre-rendered frames, so the full 3B-transition dataset fits in 326 GB. The rendering function is specified at runtime, meaning the same data can train symbolic or pixel-based agents simply by swapping the renderer.
|
| 122 |
+
|
| 123 |
+
**White-box evaluation**: Stored environment states allow online evaluation from any point in a trajectory, on training levels, unseen levels from the same distribution, or the hand-designed benchmark set.
|
| 124 |
+
|
| 125 |
+
## Citation
|
| 126 |
+
|
| 127 |
+
If you use this dataset, please cite the Kinetix paper:
|
| 128 |
+
|
| 129 |
+
```bibtex
|
| 130 |
+
@article{matthews2024kinetix,
|
| 131 |
+
title={Kinetix: Investigating the Training of General Agents through Open-Ended Physics-Based Control Tasks},
|
| 132 |
+
author={Michael Matthews and Michael Beukman and Chris Lu and Jakob Foerster},
|
| 133 |
+
booktitle={The Thirteenth International Conference on Learning Representations},
|
| 134 |
+
year={2025},
|
| 135 |
+
url={https://arxiv.org/abs/2410.23208}
|
| 136 |
+
}
|
| 137 |
+
```
|
| 138 |
+
|
| 139 |
+
## Acknowledgements
|
| 140 |
+
|
| 141 |
+
Compute for this work was provided by the Isambard-AI National AI Research Resource under the project "FLAIR 2025 Moonshot Projects". Thanks to Alex Goldie and Jarek Liessen for useful discussions.
|