Skip to content

Commit 6fa0cbb

Browse files
Docs edits (#178)
* Simplify data downloading. * Add links. * Update WOSAC eval section. * Minor. * Rephrase. * Fixes. * Naming edits. * Naming edits.
1 parent 0eeec10 commit 6fa0cbb

7 files changed

Lines changed: 105 additions & 104 deletions

File tree

docs/benchmark-readme.md

Lines changed: 0 additions & 68 deletions
This file was deleted.

docs/data.md

Lines changed: 11 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# Data
22

3-
PufferDrive consumes map binaries generated from the Waymo Open Motion Dataset (WOMD) JSON files. This page covers where to obtain data and how to convert it into the binary format expected by the simulator.
3+
PufferDrive consumes map binaries generated from multiple data sources, including the [Waymo Open Motion Dataset (WOMD)](https://github.com/waymo-research/waymo-open-dataset) JSON files, [ScenarioMax](https://github.com/valeoai/V-Max), and [CARLA](https://carla.org/). This page covers how to obtain data and convert it into the binary format expected by the simulator.
44

55
## Download options
6-
- **Mini dataset**: [GPUDrive_mini](https://huggingface.co/datasets/EMERGE-lab/GPUDrive_mini) with ~1k training files for quick experiments.
7-
- **Full dataset**: [GPUDrive](https://huggingface.co/datasets/EMERGE-lab/GPUDrive) with ~100k scenes for large-scale training.
6+
- [`pufferdrive_womd_train`](https://huggingface.co/datasets/daphne-cornelisse/pufferdrive_womd_train): **10k scenarios** from the Waymo Open Motion _training_ dataset
7+
- [`pufferdrive_womd_val`](https://huggingface.co/datasets/daphne-cornelisse/pufferdrive_womd_val): **10k scenarios** from the Waymo Open Motion _validation_ dataset
88
- Additional compatible sources: [ScenarioMax](https://github.com/valeoai/ScenarioMax) exports JSON in the same format.
99
- Included CARLA maps: CARLA exports live in `data_utils/carla/carla`.
1010

@@ -13,29 +13,19 @@ Install the CLI once:
1313

1414
```bash
1515
uv pip install -U "huggingface_hub[cli]"
16-
```
17-
18-
Download the mini dataset:
16+
```https://github.com/valeoai/V-Max
1917
18+
Download:
2019
```bash
21-
huggingface-cli download EMERGE-lab/GPUDrive_mini \
20+
huggingface-cli download daphne-cornelisse/pufferdrive_womd_train \
2221
--repo-type dataset \
23-
--local-dir data/processed/training \
24-
--include "training/*"
25-
```
26-
27-
Download the full dataset:
28-
29-
```bash
30-
huggingface-cli download EMERGE-lab/GPUDrive \
31-
--repo-type dataset \
32-
--local-dir data/processed/training \
33-
--include "training/*"
22+
--local-dir data/processed/training
3423
```
3524

3625
Place raw JSON files under `data/processed/training` (default location read by the conversion script).
3726

3827
## Convert JSON to map binaries
28+
3929
The conversion script writes compact `.bin` maps to `resources/drive/binaries`:
4030

4131
```bash
@@ -64,5 +54,6 @@ Refer to [Simulator](simulator.md) for how the binaries are consumed during rese
6454
- With binaries in place, run `puffer train puffer_drive` from [Getting Started](getting-started.md) as a smoke test that the build, data, and bindings are wired together.
6555
- To inspect the binary output, convert a single JSON file with `load_map(<json>, <id>, <output_path>)` inside `drive.py`.
6656

67-
## Waymo map editor
68-
See [WOMD Editor](womd-editor.md) for a browser-based workflow to inspect, edit, and export Waymo/ScenarioMax JSON into the `.bin` format consumed by the simulator.
57+
## Interactive scenario editor
58+
59+
See [Interactive scenario editor](scene-editor.md) for a browser-based workflow to inspect, edit, and export Waymo/ScenarioMax JSON into the `.bin` format consumed by the simulator.

docs/evaluation.md

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
# Evaluation
1+
# Evaluations and benchmarks
22

3-
Benchmarks are provided to measure how closely agents match real-world driving behavior and how well they pair with human trajectories.
3+
Driving is a safety-critical multi-agent application, making careful evaluation and risk assessment essential. Mistakes in the real world are costly, so simulations are used to catch errors before deployment. To support rapid iteration, evaluations should ideally run efficiently. This is why we also paid attention to optimizing the speed of the evaluations. This page contains an overview of the available benchmarks and evals.
4+
5+
## Sanity maps 🐛
46

5-
## Sanity maps
67
Quickly test the training on curated, lightweight scenarios without downloading the full dataset. Each sanity map tests a specific behavior.
78

89
```bash
@@ -15,9 +16,10 @@ Or run them all at once:
1516
puffer sanity puffer_drive --wandb --wandb-name sanity-all
1617
```
1718

18-
- Tip:Turn learning-rate annealing off for these short runs (`--train.anneal_lr False`) to keep the sanity checks from decaying the optimizer mid-run.
19+
- Tip: turn learning-rate annealing off for these short runs (`--train.anneal_lr False`) to keep the sanity checks from decaying the optimizer mid-run.
1920

2021
Available maps:
22+
2123
- `forward_goal_in_front`: Straight approach to a goal in view.
2224
- `reverse_goal_behind`: Backward start with a behind-the-ego goal.
2325
- `two_agent_forward_goal_in_front`: Two agents advancing to forward goals.
@@ -31,21 +33,24 @@ Available maps:
3133

3234
![Sanity map gallery placeholder](images/maps_screenshot.png)
3335

34-
## WOSAC distributional realism
35-
Evaluate how realistic your policy behaves compared to the Waymo Open Sim Agents Challenge (WOSAC):
36+
## Distributional realism benchmark 📊
37+
38+
We provide a PufferDrive implementation of the Waymo Open Sim Agents Challenge (WOSAC) for fast, easy evaluation of how well your trained agent matches distributional properties of human behavior.
3639

3740
```bash
3841
puffer eval puffer_drive --eval.wosac-realism-eval True
3942
```
4043

41-
Add `--load-model-path <path_to_checkpoint>.pt` to score a trained policy instead of a random baseline.
42-
See [WOSAC Benchmark](benchmark-readme.md) for the metric pipeline and links to the official configs.
44+
Add `--load-model-path <path_to_checkpoint>.pt` to score a trained policy, instead of a random baseline.
45+
46+
See [the WOSAC benchmark page](wosac.md) for the metric pipeline and all the details.
47+
48+
## Human-compatibility benchmark 🤝
4349

44-
## Human-compatibility
45-
Test how a policy coexists with human-controlled agents:
50+
You may be interested in how compatible your agent is with human partners. For this purpose, we support an eval where your policy only controls the self-driving car (SDC). The rest of the agents in the scene are stepped using the logs. While it is not a perfect eval since the human partners here are static, it will still give you a sense of how closely aligned your agent's behavior is to how people drive. You can run it like this:
4651

4752
```bash
4853
puffer eval puffer_drive --eval.human-replay-eval True --load-model-path <path_to_checkpoint>.pt
4954
```
5055

51-
During this evaluation the self-driving car (SDC) is controlled by your policy while other agents replay log data.
56+
During this evaluation the self-driving car (SDC) is controlled by your policy while other agents replay log trajectories.

docs/index.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,14 @@
1212
</div>
1313

1414
## Highlights
15-
- Multi-agent drive environment with batched stepping for speed.
15+
16+
- Multi-agent drive environment that trains agents at 300K steps per second.
1617
- Scripts to convert Waymo Open Motion Dataset JSON into lightweight binaries (CARLA sample map included).
1718
- Benchmarks for distributional realism and human compatibility.
1819
- Raylib-based visualizer for local or headless render/export.
1920

2021
## Quick start
22+
2123
- Follow [Getting Started](getting-started.md) to install, build the C extensions, and run `puffer train puffer_drive`.
2224
- Consult [Simulator](simulator.md) for how actions/observations, rewards, and `.ini` settings map to the underlying C environment and Torch policy.
2325
- Prepare drive map binaries with the steps in [Data](data.md).
@@ -41,7 +43,7 @@
4143
<div class="step-card">
4244
<div class="badge">Step 3</div>
4345
<h3>Train & Evaluate</h3>
44-
<p>Run `puffer train puffer_drive` and score policies with WOSAC and human-replay benchmarks.</p>
46+
<p>Train agents and evaluate them with WOSAC and human-replay benchmarks.</p>
4547
<a href="evaluation/">Open guide</a>
4648
</div>
4749
</div>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# WOMD Editor
1+
# Interactive scenario editor
22

33
A browser-based playground for inspecting and editing Waymo Open Motion Dataset (WOMD) scenes. The tool runs fully client-side at <https://womd-editor.vercel.app/> and works directly with the JSON format produced by Waymo/ScenarioMax exports and PufferDrive conversions.
44

docs/wosac.md

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
# Waymo Open Sim Agent Challenge (WOSAC) Benchmark
2+
3+
We provide a re-implementation of the [Waymo Open Sim Agent Challenge (WOSAC)](https://waymo.com/research/the-waymo-open-sim-agents-challenge/), which measures _distributional realism_ of simulated trajectories compared to logged human trajectories. Our version preserves the original logic and metric weighting but uses PyTorch on GPU for the metrics computation, unlike the original TensorFlow CPU implementation. The code is also simplified for clarity, making it easier to understand, adapt, and extend.
4+
5+
**Note:** In PufferDrive, agents are conditioned on a "goal" represented as a single (x, y) position, reflecting that drivers typically have a high-level destination in mind. Evaluating whether an agent matches human distributional properties can be decomposed into: (1) inferring a person's intended direction from context (1 second in WOSAC) and (2) navigating toward that goal in a human-like manner. We focus on the second component, though the evaluation could be adapted to include behavior prediction as in the original WOSAC.
6+
7+
[TODO: ADD bar graphs]
8+
9+
## Usage
10+
11+
### Running a single evaluation from a checkpoint
12+
13+
The `[eval]` section in `drive.ini` contains all relevant configurations. To run the WOSAC eval once:
14+
15+
```bash
16+
puffer eval puffer_drive --eval.wosac-realism-eval True --load-model-path <your-trained-policy>.pt
17+
```
18+
19+
The default configs aim to emulate the WOSAC settings as closely as possible, but you can adjust them:
20+
21+
```ini
22+
wosac_num_rollouts = 32 # Number of policy rollouts per scene
23+
wosac_init_steps = 10 # When to start the simulation
24+
wosac_num_agents = 256 # Total number of WOSAC agents to evaluate
25+
wosac_control_mode = "control_wosac" # Control the tracks to predict
26+
wosac_init_mode = "create_all_valid" # Initialize from the tracks to predict
27+
wosac_goal_behavior = 2 # Stop when reaching the goal
28+
wosac_goal_radius = 2.0 # Can shrink goal radius for WOSAC evaluation
29+
```
30+
31+
### Log evals to W&B during training
32+
33+
During experimentation, logging key metrics directly to W&B avoids a post-training step. Evaluations can be enabled during training, with results logged under a separate `eval/` section. The main configuration options:
34+
35+
```ini
36+
[train]
37+
checkpoint_interval = 500 # Set equal to eval_interval to use the latest checkpoint
38+
39+
[eval]
40+
eval_interval = 500 # Run eval every N epochs
41+
map_dir = "resources/drive/binaries/training" # Dataset to use
42+
```
43+
44+
## Baselines
45+
46+
We provide baselines on a small curated dataset from the WOMD validation set with perfect ground-truth (no collisions or off-road events from labeling mistakes).
47+
48+
| Method | Realism meta-score | Kinematic metrics | Interactive metrics | Map-based metrics | minADE | ADE |
49+
|--------|-------------------|-------------------|---------------------|-------------------|--------|------|
50+
| Ground-truth (UB) | 0.832 | 0.606 | 0.846 | 0.961 | 0 | 0 |
51+
| π_Base self-play RL | - | - | - | - | - | - |
52+
| [SMART](https://arxiv.org/abs/2405.15677) | 0.805 | 0.534 | 0.830 | 0.949 | 1.124 | 3.123 |
53+
| π_Random | 0.485 | 0.214 | 0.657 | 0.408 | 6.477 | 18.286 |
54+
55+
*Table: WOSAC baselines in PufferDrive on 229 selected clean held-out validation scenarios.*
56+
57+
---
58+
59+
> ✏️ Download the dataset from [Hugging Face](https://huggingface.co/datasets/daphne-cornelisse/pufferdrive_wosac_val_clean) to reproduce these results or benchmark your policy.
60+
61+
---
62+
63+
## Useful links
64+
65+
- [WOSAC challenge and leaderboard](https://waymo.com/open/challenges/2025/sim-agents/)
66+
- [Sim agent challenge tutorial](https://github.com/waymo-research/waymo-open-dataset/blob/master/tutorial/tutorial_sim_agents.ipynb)
67+
- [Reference paper introducing WOSAC](https://arxiv.org/pdf/2305.12032)
68+
- [Metrics entry point](https://github.com/waymo-research/waymo-open-dataset/blob/master/src/waymo_open_dataset/wdl_limited/sim_agents_metrics/metrics.py)
69+
- [Log-likelihood estimators](https://github.com/waymo-research/waymo-open-dataset/blob/master/src/waymo_open_dataset/wdl_limited/sim_agents_metrics/estimators.py)
70+
- [Configurations proto file](https://github.com/waymo-research/waymo-open-dataset/blob/99a4cb3ff07e2fe06c2ce73da001f850f628e45a/src/waymo_open_dataset/protos/sim_agents_metrics.proto#L51)
71+
- [Default sim agent challenge configs](https://github.com/waymo-research/waymo-open-dataset/blob/master/src/waymo_open_dataset/wdl_limited/sim_agents_metrics/challenge_2025_sim_agents_config.textproto)

mkdocs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,12 @@ nav:
2828
- Docs:
2929
- Getting started: getting-started.md
3030
- Simulator: simulator.md
31-
- Interactive scenario editor: womd-editor.md
31+
- Interactive scenario editor: scene-editor.md
3232
- Visualizer: visualizer.md
3333
- Data: data.md
3434
- Benchmarks:
3535
- Overview: evaluation.md
36-
- WOSAC: benchmark-readme.md
36+
- WOSAC: wosac.md
3737
- Blog:
3838
- pufferdrive 2.0: pufferdrive-2.0.md
3939

0 commit comments

Comments
 (0)