Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
341 commits
Select commit Hold shift + click to select a range
4c7fca5
Fix unit test.
Kait0 Aug 18, 2026
b0ae442
remove unused features.
Kait0 Aug 18, 2026
8530d04
add changes to make eval map folder selectable.
Kait0 Aug 18, 2026
d3fa080
k_scaled_0011 train and eval with changed CARLA maps.
Kait0 Aug 18, 2026
6b15a52
Fix comments and naming of functions
Kait0 Aug 19, 2026
3d3c762
Merge branch '4_bernhard_dev' into 6_bernhard_dev
Kait0 Aug 19, 2026
5cc48aa
Do not report failure replay to wandb
Kait0 Aug 19, 2026
31f0cab
Add parallel eval for up to 8 GPUs.
Kait0 Aug 19, 2026
13957c2
k_scaled_0012 again with additional map fixes.
Kait0 Aug 19, 2026
114d6f3
Try to speed up eval.
Kait0 Aug 20, 2026
f8e5ec2
Fix bug in puffer comfort score not computed.
Kait0 Aug 20, 2026
e926a9c
Make eval.reward_comfort=0.0 \
Kait0 Aug 20, 2026
d9fd90a
k_scaled_0013, more map fixes and comfort changes and lane assignment…
Kait0 Aug 20, 2026
196d567
Implement optional advantage filter leaking and entropy annealing.
Kait0 Aug 20, 2026
8af651a
Average logs across ranks.
Kait0 Aug 20, 2026
194c0d9
give parallel eval multi-node option-
Kait0 Aug 21, 2026
f23ae52
reeval without reward params change.
Kait0 Aug 21, 2026
8eae220
Improve red light detection logic by switching to CaRL style RL detec…
Kait0 Aug 21, 2026
e648a05
normalize goal points properly. remove unsued features. add stop line…
Kait0 Aug 21, 2026
9136436
fix end of training shutdown
Kait0 Aug 22, 2026
809acc1
seperate gradient clipping. separate_grad_clip
Kait0 Aug 22, 2026
e7b8cf0
k_scaled_0023_ new RL and grad clip and obs norm
Kait0 Aug 22, 2026
d34be81
k_scaled_0024_ + adv_filter_leak_fraction=0.05
Kait0 Aug 22, 2026
3db594b
restart 23
Kait0 Aug 22, 2026
13acb06
eval k_scaled_0023_1000
Kait0 Aug 23, 2026
d737995
change close
Kait0 Aug 23, 2026
ff80239
change scripts to instead check if the model exists.
Kait0 Aug 23, 2026
e02eb82
fix rendering
Kait0 Aug 23, 2026
22b0925
Quantize goal points differently such that they don't wiggle in the s…
Kait0 Aug 23, 2026
b24c547
Make more benchmark values configurable. Eval with GIGAFLOW dt and go…
Kait0 Aug 23, 2026
ff7e766
make number of slots configurable at eval time.
Kait0 Aug 23, 2026
cc2cf06
try goal regen mode rolling.
Kait0 Aug 23, 2026
02fba20
test eval.goal_speed=3.0
Kait0 Aug 23, 2026
7e9a306
Train again.
Kait0 Aug 23, 2026
1c83a8e
Increase distance between spawned cars to avoid failure case where th…
Kait0 Aug 24, 2026
da54e75
match ceil behavior and naming.-
Kait0 Aug 24, 2026
478bcf7
k_scaled_0025 24 + env.partner_blindness_prob=0.05 \
Kait0 Aug 24, 2026
69210cd
switch train rendering to the html renderer. Reduce memory footprint …
Kait0 Aug 24, 2026
a32fe9c
eval k_scaled_0024_1000
Kait0 Aug 24, 2026
1e3080e
k_scaled_0025_ turn off steer freeze in phantom braking for k_scaled_…
Kait0 Aug 24, 2026
659c034
remove advantage filter leak it increased RL infractions
Kait0 Aug 24, 2026
2f99e68
goal_heading_max_deg = 60° like in GIGAFLOW.
Kait0 Aug 24, 2026
4365c8f
Make number of phantom and blind agents a uniform draw instead of a f…
Kait0 Aug 24, 2026
a3bb28b
k_scaled_0026_ draw phantom breakers and blind agents uniformely inst…
Kait0 Aug 24, 2026
001e18a
goals configurage. Evaluate with same goal sourcing as in training.
Kait0 Aug 25, 2026
73d4e05
Add speed constants and update dynamics to use nominal speed limits
vcharraut Aug 25, 2026
c11afae
Update advantage standard deviation calculation to use unbiased=False
vcharraut Aug 25, 2026
c97610c
Add base maximum speed parameter to drive configuration
vcharraut Aug 25, 2026
416baf3
Remove default base maximum speed constant from drive configuration
vcharraut Aug 25, 2026
2e60910
Add observation normalization speed parameter to drive configuration
vcharraut Aug 25, 2026
ffcabe0
Merge remote-tracking branch 'origin/vcha/add-cond-speed' into 6_bern…
Kait0 Aug 25, 2026
adb9a21
Merge remote-tracking branch 'origin/vcha/add-cond-speed' into 6_bern…
Kait0 Aug 25, 2026
f94baea
k_scaled_0027 + env.goal_heading_max_deg = 60.0 + env.base_max_speed_…
Kait0 Aug 25, 2026
95aab34
minor
Kait0 Aug 25, 2026
a6dcedd
Match eval to GIGAFLOW-
Kait0 Aug 25, 2026
5736696
Make nuPlan more similar to CARLA.
Kait0 Aug 25, 2026
0d63507
disabled red light infractions on nuPlan maps.
Kait0 Aug 25, 2026
a7a1d05
eval model fast
Kait0 Aug 26, 2026
89a2085
redo with lower safety margin.
Kait0 Aug 26, 2026
a579d46
minro
Kait0 Aug 26, 2026
62f1da2
Make max speed configurable during eval
Kait0 Aug 26, 2026
d33275b
minor
Kait0 Aug 26, 2026
8d8d679
remove rl infractions.
Kait0 Aug 26, 2026
cbce4ec
minor
Kait0 Aug 26, 2026
ced8920
change nuPlan to multi
Kait0 Aug 26, 2026
4addf52
5 try with out lane center reward change.
Kait0 Aug 26, 2026
d457661
_short6 env.eval_perceived_size_margin_m=0.2
Kait0 Aug 26, 2026
112d0d0
Fix nuplan bugs and eval with 0.25 increase
Kait0 Aug 26, 2026
15200a5
minor
Kait0 Aug 26, 2026
d9b84f5
minor
Kait0 Aug 26, 2026
82d8386
eval more. Only 100 meter max goal distance.
Kait0 Aug 26, 2026
e59868c
minor
Kait0 Aug 26, 2026
54106eb
fix bugs in nuPlan self-play.
Kait0 Aug 26, 2026
e58d9dc
eval.max_goal_spacing=30, +30cm
Kait0 Aug 26, 2026
14c5216
new
Kait0 Aug 26, 2026
35aed75
Use center to determine red light infraction.
Kait0 Aug 26, 2026
27b2033
fix nuPlan eval. and rerun.
Kait0 Aug 26, 2026
1e1cb61
k_scaled_0028 reset_accel_on_stop + new eval setup.
Kait0 Aug 26, 2026
a0cf3ae
remove small deviations and bugs. kurvature missing, scenario_lengt…
Kait0 Aug 26, 2026
c641f84
fix small deviations: obs_slots_partners_n: 20 max_agents_per_env: 15…
Kait0 Aug 26, 2026
11dcb72
cosim launch during traing wire
Aug 26, 2026
faf5174
k_scaled_0028_1000 fast eval
Kait0 Aug 27, 2026
0ae12aa
rerun carla
Kait0 Aug 27, 2026
a678e12
bugfix
Kait0 Aug 27, 2026
7caa8aa
reduce perceived margin.
Kait0 Aug 27, 2026
ed2ca47
minor
Kait0 Aug 27, 2026
092c9ff
try _short3
Kait0 Aug 27, 2026
4709885
eval 4
Kait0 Aug 27, 2026
bea848f
Add traffic light coordination at eval time.
Kait0 Aug 27, 2026
65ba01e
5x more driving.
Kait0 Aug 27, 2026
a86546b
_medium2 mode + red light infractions.
Kait0 Aug 27, 2026
ac96fcb
minor
Kait0 Aug 27, 2026
4b63100
Add entropy annealing to training run.
Kait0 Aug 27, 2026
ddd128f
eval sample
Kait0 Aug 27, 2026
d2ab0a3
k_scaled_0030 entropy annealing.
Kait0 Aug 27, 2026
3590abf
add more info to viz
Kait0 Aug 28, 2026
484abc3
Update viz. eval k 30
Kait0 Aug 28, 2026
37966ae
rerun with mean
Kait0 Aug 28, 2026
c259580
rerun without RL
Kait0 Aug 28, 2026
5d85105
eval jerk clipping.
Kait0 Aug 28, 2026
c9ff71e
Try 1.0
Kait0 Aug 28, 2026
521568e
mps3=1.5
Kait0 Aug 28, 2026
4839b58
Implement full float32 training.
Kait0 Aug 28, 2026
e80acd3
eval with old TL logic.
Kait0 Aug 28, 2026
e316e5d
k_scaled_0028_1000 with new eval hack
Kait0 Aug 28, 2026
1665586
test medium 11
Kait0 Aug 28, 2026
e06c1e0
eval hole fixes again
Kait0 Aug 28, 2026
60feee4
_long
Kait0 Aug 28, 2026
4a92797
Make traffic_light_junction_phases optional and update maps, fix unit…
Kait0 Aug 28, 2026
f8718cb
update default params, fix unit test, format changes.
Kait0 Aug 28, 2026
f6557ae
Merge remote-tracking branch 'origin/3.0' into 6_bernhard_dev
Kait0 Aug 28, 2026
bde1b57
remove unbiased=False that snuck in
Kait0 Aug 28, 2026
4768bdd
Merge branch '6_bernhard_dev' into 8_bernhard_dev
Kait0 Aug 28, 2026
8408c0f
add lane width
Kait0 Aug 28, 2026
349efb1
cosim wandb submit
Aug 28, 2026
ee5fb1c
add missing lane widths to the repo. Add kurvature and lane width to …
Kait0 Aug 28, 2026
cb2130a
k_scaled_0031 train with map augmentations and other small fixes comp…
Kait0 Aug 28, 2026
909a513
increase obs_dropout_lane: 0.5 to match the paper
Kait0 Aug 28, 2026
bb17adc
randomize spawn position and orientation.
Kait0 Aug 28, 2026
bdb3c1e
dampen start random
Kait0 Aug 28, 2026
9c234b7
add assert against configuring the wrong map amount.
Kait0 Aug 29, 2026
5e0424f
update scripts.
Kait0 Aug 29, 2026
2406fbc
k_scaled_0032_1000
Kait0 Aug 30, 2026
c764b4e
k_scaled_0033 train fp32 heads.
Kait0 Aug 30, 2026
8af1be4
Match gigaflow features more closely.
Kait0 Aug 30, 2026
93cc6cf
eval 34
Kait0 Aug 31, 2026
0facee4
Add correct speed limits to CARLA maps.
Kait0 Aug 31, 2026
c6a7e00
k_scaled_0035 + train with speed limits
Kait0 Aug 31, 2026
74bc222
remove hardcoded nuPlan paths.
Kait0 Aug 31, 2026
e7f8cb7
minor
Kait0 Aug 31, 2026
b1b8f01
different env
Kait0 Aug 31, 2026
988f589
fix path
Kait0 Aug 31, 2026
4289683
nuPlan trainval
Kait0 Aug 31, 2026
05b1ff1
use val dir
Kait0 Aug 31, 2026
bc3c7f9
max out ressources.
Kait0 Aug 31, 2026
2a3de88
turn off visu increase utilization.
Kait0 Aug 31, 2026
7a2385f
do 40 shards again
Kait0 Aug 31, 2026
03949ef
cleanup nicer
Kait0 Aug 31, 2026
9e9b2f4
print progress
Kait0 Aug 31, 2026
8742e91
increase npar to max again.
Kait0 Aug 31, 2026
34a87dd
do 80 worker 112 split, some caching to improve efficiency.
Kait0 Aug 31, 2026
6f1da20
change to eval mode during eval with GIGAFLOW hyperparamters. Switch …
Kait0 Aug 31, 2026
d3288f1
instead of shards use ray worker
Kait0 Aug 31, 2026
2e27210
fix eval mode crash
Kait0 Aug 31, 2026
a7d15bc
eval nuPlan again with proper despawn
Kait0 Sep 1, 2026
5a9b548
Init cars correctly in log replay
Kait0 Sep 1, 2026
a45d963
rerun
Kait0 Sep 1, 2026
7939ce7
change map dior
Kait0 Sep 1, 2026
120145c
bugfix
Kait0 Sep 1, 2026
5c5584c
more efficient masking implementation and try masking in the next mod…
Kait0 Sep 1, 2026
24255dd
fix nuPlan eval to 10 Hz to match the data. Add brownian noise option…
Kait0 Sep 1, 2026
bb6d1b5
eval 5
Kait0 Sep 1, 2026
0c952d9
k_036 train with env.pose_noise_xy_m=0.025 \
Kait0 Sep 1, 2026
a151445
Merge remote-tracking branch 'origin/yvonne/cosim_3.0' into 9_bernhar…
Kait0 Sep 1, 2026
5e23f68
rename script
Kait0 Sep 1, 2026
59f5ee1
eval k_scaled_0035_1000 on nuPlan
Kait0 Sep 1, 2026
986983d
update nuPlan path
Kait0 Sep 1, 2026
91f960d
paths
Kait0 Sep 1, 2026
c7869b8
update puffer before cosim
Kait0 Sep 1, 2026
4fc881b
and gpu so compile will work
Kait0 Sep 1, 2026
ae5b778
only run reactive for now
Kait0 Sep 1, 2026
bfb49c1
Update maps to remove lane bugs.
Kait0 Sep 1, 2026
3c7776a
Merge branch '8_bernhard_dev' into 9_bernhard_dev
Kait0 Sep 1, 2026
c5f4ffd
catch some silent errors.
Kait0 Sep 1, 2026
f18dd96
bugfix for nuPlan evals
Kait0 Sep 1, 2026
336d9cf
fix the action not sending continuous signals.
Kait0 Sep 1, 2026
ca719df
start nuPlan fixes
Kait0 Sep 2, 2026
322103a
fix cosim for nuPlan
Kait0 Sep 2, 2026
2b10496
speedup vizu via opencv.
Kait0 Sep 2, 2026
a9a0aa4
eval nuPlan k_scaled_0036_1000
Kait0 Sep 2, 2026
713c922
Merge branch '8_bernhard_dev' of https://github.com/Emerge-Lab/Puffer…
Kait0 Sep 2, 2026
23989e5
rerun
Kait0 Sep 2, 2026
10e8b7d
Merge branch '8_bernhard_dev' into 9_bernhard_dev
Kait0 Sep 2, 2026
84cede5
eval again with rl
Kait0 Sep 2, 2026
91f7cb1
Change visu to html , eval model 0036
Kait0 Sep 2, 2026
ed12bce
fix it
Kait0 Sep 2, 2026
4c47ee3
fix
Kait0 Sep 2, 2026
1b6aa4f
goal fixes. other bug fixes. Try eval with gt_map and 40 partner obs
Kait0 Sep 2, 2026
84bffdb
add increase vehicle size for eval.
Kait0 Sep 2, 2026
c39a084
remove static poles from obs. update visu with GT ghost agent.
Kait0 Sep 2, 2026
09ca44c
test new goal conditioning with continuation.
Kait0 Sep 2, 2026
49e6b33
implement damiano seconds stopped changes.
Kait0 Sep 3, 2026
552a265
change goal mode roadblock, remove gt_map, add jerk cap during the fi…
Kait0 Sep 3, 2026
1b17fd7
fix bug with conditioning
Kait0 Sep 3, 2026
b47062f
Try speed cap in slow areas.
Kait0 Sep 3, 2026
fed57a3
fix goal points in intersections.
Kait0 Sep 3, 2026
a26f3b3
smoother breaking
Kait0 Sep 3, 2026
6eb4a1c
min size for pedestrian to match train distribution.
Kait0 Sep 3, 2026
1c38ea8
fix condittioning.
Kait0 Sep 4, 2026
026f99a
eval k_scaled_0037_1000
Kait0 Sep 6, 2026
a5c4e7d
rerun with more
Kait0 Sep 6, 2026
af512f0
Add strongest Model. 1M km/infraction self-play eval (70km/h), 90 CLS…
Kait0 Sep 8, 2026
0fb9433
Fix bug where blind agents masks were not update correctly at reset.
Kait0 Sep 21, 2026
50bf542
Add feature of speedzone, which can be randomized at training time to…
Kait0 Sep 21, 2026
c00d4b5
Fix issue with log rewards using wrong bounds.
Kait0 Sep 22, 2026
6e70da7
Check if early stuck return is fixed with some diagnostics.
Kait0 Sep 22, 2026
0d4a323
add test script
Kait0 Sep 22, 2026
35ff529
Remove eval hack for min speed. New model should be able to handle lo…
Kait0 Sep 22, 2026
deaaf76
eval k_scaled_0038_1000 on nuplan
Kait0 Sep 22, 2026
cfc822d
change to no junction phases
Kait0 Sep 22, 2026
203e71f
eval 38 again
Kait0 Sep 22, 2026
c0bf63d
make overspeed tolerance configurable and 0. Give a default value whe…
Kait0 Sep 22, 2026
48720ba
Improve map chache to use much less RAM.
Kait0 Sep 23, 2026
775dd90
Fix wandb logging and add CARLA leaderboard eval stuff and fixes
Kait0 Sep 23, 2026
e57b657
fix tl issue on town 02
Kait0 Sep 23, 2026
362d6f5
Fix town 02 issues on CARLA
Kait0 Sep 23, 2026
9aa1ac8
Update maps to add missing stop signs.
Kait0 Sep 23, 2026
5943abc
Fix height changes and fix bug in map
Kait0 Sep 23, 2026
497fec1
zero partner stopped time and increas max speed to 30 m/s
Kait0 Sep 23, 2026
ecf699b
eval nuPlan new model
Kait0 Sep 24, 2026
f46d0f0
fix collisions counting twice in metric.
Kait0 Sep 24, 2026
93c7a56
fix rare bug where incorrect offroad is reported.
Kait0 Sep 24, 2026
e6da02f
log better
Kait0 Sep 24, 2026
03ae1f1
Fix nuPlan light assignments
Kait0 Sep 24, 2026
c103d56
run nuPlan again with different values and a small fix
Kait0 Sep 24, 2026
4e124df
implement stop sign logic during training. add some rendering update …
Kait0 Sep 24, 2026
bc7b5c2
add min pedestrian size, stop sign harness for carla,
Kait0 Sep 24, 2026
1266e29
merge valentins autoreset changes
Kait0 Sep 24, 2026
3857513
update town 04. Missing obstacles were added
Kait0 Sep 24, 2026
6425d61
eval model 40 on CARLA
Kait0 Sep 25, 2026
ee58334
fix stop sign infractions and disable them for the eval. add them to …
Kait0 Sep 25, 2026
efcf6fa
don't visualize yield signs
Kait0 Sep 25, 2026
8b48ffe
implement staggered environments to prevent noisy logging after resam…
Kait0 Sep 25, 2026
d675ea1
eval longest6 after model training
Kait0 Sep 25, 2026
66e797d
Merge remote-tracking branch 'origin/3.0' into 10_bernhard_dev
Kait0 Sep 25, 2026
7f7d5ce
improve error message handling
Kait0 Sep 26, 2026
5c673e0
fix cosim bug
Kait0 Sep 26, 2026
f112305
eval 41 again
Kait0 Sep 26, 2026
8339e26
eval with train goal sampler like in paper. Train with traffic group …
Kait0 Sep 26, 2026
50aff6c
switch back to route conditioning.
Kait0 Sep 28, 2026
c21ebde
revert map sampling back to original state did not work.
Kait0 Sep 28, 2026
60f8e9e
add x16 option to visu, because longest6 is slower
Kait0 Sep 28, 2026
187225a
Only log mp4 when requested on longest6
Kait0 Sep 28, 2026
368b9e6
fix two smaller bugs with goals and gradient accumulation. 0043 witho…
Kait0 Sep 28, 2026
a23f085
add speed optimization
Kait0 Sep 28, 2026
67c6220
Merge remote-tracking branch 'origin/3.0' into 10_bernhard_dev
Kait0 Sep 29, 2026
10365f2
added scripts to eval Alpasim
Kait0 Sep 29, 2026
da66a36
fix some rare cases where the car spawned too close to the border.
Kait0 Sep 29, 2026
743f1e3
fix train visu bug. Add speed limits to lane observations. k_0044
Kait0 Sep 29, 2026
4e314eb
fix stopped cars getting the position noise
Kait0 Sep 29, 2026
f4e3258
visualize speed limits on lanes.
Kait0 Sep 29, 2026
f0cbb33
visu fix
Kait0 Sep 29, 2026
4121722
add nuPlan nonreactive to eval
Kait0 Sep 30, 2026
b148e66
Merge branch '10_bernhard_dev' of https://github.com/Emerge-Lab/Puffe…
Kait0 Sep 30, 2026
0034b0f
train with 32 GPUs instead
Kait0 Sep 30, 2026
ee8669b
remove old broken nuPlan debug config
Kait0 Sep 30, 2026
14dbf91
update golden and formatting
Kait0 Sep 30, 2026
b136e00
Fix comment
Kait0 Oct 5, 2026
3b05c30
clang
Kait0 Oct 5, 2026
3cc95b5
update comment
Kait0 Oct 5, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,10 @@ To add a metric to the report: add its key to `TREND_METRICS` /
| `collision_behavior` | `1` | `0` ignore, `1` stop, `2` remove |
| `offroad_behavior` | `1` | Same options |
| `traffic_light_behavior` | `1` | Same options |
| `stop_sign_behavior` | `1` | Same options |
| `traffic_lights_enabled` | `True` | Observe and enforce traffic lights |
| `stop_signs_enabled` | `False` | Observe and enforce stop signs (CaRL RunStopSign2 semantics, penalised with `reward_stop_line`) |
| `yield_signs_enabled` | `False` | Observe yield signs |
| `control_mode` | `"control_vehicles"` | `"control_vehicles"`, `"control_agents"`, `"control_sdc_only"` |
| `reward_conditioning` | `False` | Condition policy on reward weights |
| `reward_randomization` | `False` | Randomize reward weights each episode |
Expand Down
14 changes: 14 additions & 0 deletions data_utils/mirror_map_bin.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@

TRAFFIC_PHASE_SECTION_TAG = b"TLPHASE1"
LANE_WIDTH_SECTION_TAG = b"LANEWID1"
SPEED_ZONE_SECTION_TAG = b"SPDZONE1"


def _is_lane(road_type: int) -> bool:
Expand Down Expand Up @@ -155,6 +156,13 @@ def read_bin(path: Path) -> dict:
if _is_lane(r["type"]):
r["widths"] = _read_f_array(f, r["S"])

zone_tag = f.read(len(SPEED_ZONE_SECTION_TAG))
has_zone_section = zone_tag == SPEED_ZONE_SECTION_TAG
assert has_zone_section or zone_tag == b"", f"unexpected bytes after width section in {path}"
for r in roads:
if _is_lane(r["type"]):
(r["speed_zone_idx"],) = _read("<i", f) if has_zone_section else (-1,)

trailing = f.read()
assert not trailing, f"{len(trailing)} unparsed trailing bytes in {path}"

Expand All @@ -172,6 +180,7 @@ def read_bin(path: Path) -> dict:
"tracks_to_predict": tracks_to_predict,
"has_phase_section": has_phase_section,
"has_width_section": has_width_section,
"has_zone_section": has_zone_section,
}


Expand Down Expand Up @@ -292,6 +301,11 @@ def write_bin(data: dict, path: Path):
for r in roads:
if _is_lane(r["type"]) and r["S"]:
f.write(struct.pack(f"<{r['S']}f", *r["widths"]))
if data["has_zone_section"]:
f.write(SPEED_ZONE_SECTION_TAG)
for r in roads:
if _is_lane(r["type"]):
f.write(struct.pack("<i", r["speed_zone_idx"]))


def main():
Expand Down
2 changes: 1 addition & 1 deletion docs/evaluation.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ puffer eval puffer_drive carla_fast \
eval.capture_observations=false
```

The default `eval.render_filter: null` disables filtered rendering. Multiple comma-separated columns use OR: `collision_rate,offroad_rate` selects scenarios where either metric is greater than zero. Use `eval.render_filter=all_infractions` to select collision, at-fault collision, offroad, and red-light failures.
The default `eval.render_filter: null` disables filtered rendering. Multiple comma-separated columns use OR: `collision_rate,offroad_rate` selects scenarios where either metric is greater than zero. Use `eval.render_filter=all_infractions` to select collision, at-fault collision, offroad, red-light, and stop-sign failures.

The filtered pass replays the selected map/seed pairs, captures standard
interactive `.replay.zlib` files, renders one HTML page per replay, and builds a
Expand Down
15 changes: 14 additions & 1 deletion pufferlib/config/evaluation/benchmark.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ env:
reward_comfort: 0.05
reward_velocity: 0.0025
reward_lane_align: 0.025
reward_lane_center: 0.0038
reward_lane_center: 0.0075 # training-range max (REWARD_BOUNDS), not the paper's 0.0038
reward_timestep: 0.000025
reward_reverse: 0.005
goal_speed: 3.0
Expand All @@ -37,6 +37,8 @@ env:
spawn_heading_max_deg: 0.0
pose_noise_xy_m: 0.0
pose_noise_yaw_deg: 0.0
speed_limit_random_prob: 0.0
stagger_first_episode: false

benchmarks:
- name: carla
Expand Down Expand Up @@ -113,6 +115,7 @@ benchmarks:
map_dir: pufferlib/resources/drive/binaries/nuplan
use_neighbor_cache: false
disable_red_light_infractions: true
disable_stop_sign_infractions: true
goal_reach_requires_speed: false

- name: nuplan_single
Expand All @@ -128,4 +131,14 @@ benchmarks:
map_dir: pufferlib/resources/drive/binaries/nuplan
use_neighbor_cache: false
disable_red_light_infractions: true
disable_stop_sign_infractions: true
goal_reach_requires_speed: false

# Closed-loop co-sim against the real external simulators (see
# pufferlib/ocean/evaluation_utils/cosim_evaluator.py), unlike the
# benchmarks above which replay pre-baked .bin maps in-process.
- name: carla_cosim
simulation_mode: carla_cosim
route_ids: [0, 1, 2]
base_carla_port: 2000
compute_config: scripts/cluster_configs/nyu_greene.yaml
33 changes: 30 additions & 3 deletions pufferlib/config/puffer_drive.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,10 @@ env:
dt: 0.3
# Base forward speed cap
base_max_speed_mps: 20.0
# Speed cap when reward_randomization is off (eval); null = base_max_speed_mps. Sets C_vel = max_speed_mps / base_max_speed_mps (training range [0.667, 1.5] -> [13.3, 30] m/s)
# Speed cap when reward_randomization is off (eval); null = base_max_speed_mps. Sets C_vel = max_speed_mps / base_max_speed_mps (training range [1/a, a] below)
max_speed_mps: null
# Training C_vel ~ X(a) = 0.5 U(1/a, 1) + 0.5 U(1, a): speed cap = base_max_speed_mps * [1/a, a]; 1.5 = paper (13.3-30 m/s), 2.0 = 10-40 m/s
conditioning_speed_scale: 1.5
# Optional nonzero launch speed for gigaflow random spawns
spawn_initial_speed: 0.0
# Gigaflow spawn pose noise: lateral offset as a fraction of half the lane width, heading offset in degrees
Expand All @@ -64,6 +66,13 @@ env:
# Gigaflow dynamics randomization: per-step brownian pose buffeting (std in meters / degrees); 0 disables
pose_noise_xy_m: 0.0
pose_noise_yaw_deg: 0.0
# Speed-limit randomization (needs SPDZONE1 maps): per episode, with this probability every speed zone shifts its
# posted limit by one uniform offset in +-delta, clipped to [min, max]; junction lanes inherit the min over entries.
# m/s: 9.72 = 35 km/h, 1.39 = 5 km/h, 36.11 = 130 km/h. 0 disables.
speed_limit_random_prob: 0.0
speed_limit_random_delta_mps: 9.72
speed_limit_random_min_mps: 1.39
speed_limit_random_max_mps: 36.11
# Collision behavior - options: "ignore", "stop", "remove"
collision_behavior: stop
# Offroad behavior - options: "ignore", "stop", "remove"
Expand All @@ -72,11 +81,14 @@ env:
traffic_light_behavior: stop
# Stop sign behavior - options: "ignore", "stop", "remove"
stop_sign_behavior: stop
# Traffic controls observed and enforced; stop-sign runs are detected as in CaRL's RunStopSign2 (reward_stop_line)
traffic_lights_enabled: true
stop_signs_enabled: false
yield_signs_enabled: false
# Skip red light violation detection (metrics, reward, behavior)
disable_red_light_infractions: false
# Skip stop sign violation detection (metrics, reward, behavior); the sign obs still turn red/green
disable_stop_sign_infractions: false
# Cycle the lights of a junction phase-by-phase (TLPHASE1 bins); false keeps independent lights (legacy)
traffic_light_junction_phases: false
# Share static map geometry (roads/grid/lane-graph) across envs using the same map
Expand All @@ -102,7 +114,11 @@ env:
init_step_spread: false
# sets an upper bound on the random init step
# the sampled init step can be at most this close to the end of the episode;
# also the shortest first episode when stagger_first_episode is on
init_step_min_horizon: 20
# training only: the first episode after every env (re)creation ends at a random step in
# [init_step_min_horizon, scenario_length], so sub-envs do not run their episodes in lockstep
stagger_first_episode: true
# options: "control_vehicles", "control_agents", "control_tracks_to_predict", "control_sdc_only"
control_mode: control_vehicles
# Controller used by agent 0, the canonical SDC/target.
Expand All @@ -126,7 +142,8 @@ env:
# --- Goal / Target ---
# Goal regeneration policy - options: "finite" (regen full set when all reached), "rolling" (sliding window)
goal_regen_mode: "finite"
# How the goal set is seeded - options: "route" (agent forward route), "map" (uniform free-roam)
# How the goal set is seeded - options: "route" (agent forward route), "map" (uniform free-roam),
# replay only: "gt" (raw logged trajectory points), "gt_map" (logged points snapped to the nearest lane center)
goal_source: map
# Append normalized lane-graph distance to the current goal lane on each lane obs row
obs_goal_lane_distance: True
Expand Down Expand Up @@ -163,6 +180,8 @@ env:
reward_reverse: 0.005
reward_timestep: 2.5e-05
reward_overspeed: 0.05
# m/s above the lane limit before the overspeed penalty fires
overspeed_tolerance_mps: 0.0
reward_ade: 0.0
# --- Map ---
# Path to map used for training
Expand All @@ -177,6 +196,10 @@ env:
obs_slots_partners_n: 20
# Append the partner's velocity relative to ego (ego frame, 2 floats) to every partner row (GIGAFLOW observes velocity)
obs_partner_relative_velocity: false
# Ego lane-angle slot: true = signed heading error theta_f / pi (GIGAFLOW B.1), false = cos(theta_f)
obs_lane_heading_signed: false
# Append each lane segment's speed limit (/ obs_norm_speed_mps) to its lane row so limit changes ahead are visible
obs_lane_speed_limit: false
obs_slots_traffic_controls_n: 4
# Fraction of segment observation slots to drop (reduces obs size)
obs_dropout_lane: 0.5
Expand Down Expand Up @@ -265,6 +288,8 @@ train:
evaluation_interval_epochs: null
# Select multiple benchmarks with a comma-separated value. eg: carla_fast,womd_single
evaluation_benchmarks: carla_fast
# Submit the carla_cosim SLURM debug hook at start/end of training.
cosim_debug_evals: False
torch_deterministic: false
cpu_offload: false
device: cuda
Expand Down Expand Up @@ -354,7 +379,7 @@ eval:
base_max_speed_mps: null
# Overrides env.goal_regen_mode ("finite" or "rolling") of every selected benchmark; null keeps the benchmark's value.
goal_regen_mode: null
# Overrides env.goal_source ("route", "map" or "gt") of every selected benchmark; null keeps the benchmark's value.
# Overrides env.goal_source ("route", "map", "gt" or "gt_map") of every selected benchmark; null keeps the benchmark's value.
goal_source: null
# Overrides env.goal_speed of every selected benchmark; null keeps the benchmark's value.
goal_speed: null
Expand All @@ -367,6 +392,8 @@ eval:
obs_slots_partners_n: null
# Overrides env.disable_red_light_infractions of every selected benchmark; null keeps the benchmark's value.
disable_red_light_infractions: null
# Overrides env.disable_stop_sign_infractions of every selected benchmark; null keeps the benchmark's value.
disable_stop_sign_infractions: null
output_name: null
# Results folder inside the run dir; also names the wandb key prefix final_<output_dir_name>_.
output_dir_name: eval
Expand Down
24 changes: 22 additions & 2 deletions pufferlib/config_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,8 @@ class GoalSource(Enum):
route = 0
map = 1
gt = 2
external = 3
gt_map = 4


class PackageName(Enum):
Expand Down Expand Up @@ -251,16 +253,22 @@ class DriveEnvConfig:
dt: float = _constrained_field(POSITIVE_NUMBER_CONSTRAINT)
base_max_speed_mps: float = _constrained_field(POSITIVE_NUMBER_CONSTRAINT)
max_speed_mps: float | None = _constrained_field(POSITIVE_NUMBER_CONSTRAINT, default=None)
conditioning_speed_scale: float = _constrained_field(POSITIVE_NUMBER_CONSTRAINT)
spawn_initial_speed: float = _constrained_field(NONNEGATIVE_NUMBER_CONSTRAINT)
spawn_lateral_offset_max_frac: float = _constrained_field(PROBABILITY_CONSTRAINT)
spawn_heading_max_deg: float = _constrained_field(NONNEGATIVE_NUMBER_CONSTRAINT)
pose_noise_xy_m: float = _constrained_field(NONNEGATIVE_NUMBER_CONSTRAINT)
pose_noise_yaw_deg: float = _constrained_field(NONNEGATIVE_NUMBER_CONSTRAINT)
speed_limit_random_prob: float = _constrained_field(PROBABILITY_CONSTRAINT)
speed_limit_random_delta_mps: float = _constrained_field(NONNEGATIVE_NUMBER_CONSTRAINT)
speed_limit_random_min_mps: float = _constrained_field(NONNEGATIVE_NUMBER_CONSTRAINT)
speed_limit_random_max_mps: float = _constrained_field(NONNEGATIVE_NUMBER_CONSTRAINT)
collision_behavior: InfractionBehavior = MISSING
offroad_behavior: InfractionBehavior = MISSING
traffic_light_behavior: InfractionBehavior = MISSING
stop_sign_behavior: InfractionBehavior = MISSING
disable_red_light_infractions: bool = MISSING
disable_stop_sign_infractions: bool = MISSING
traffic_light_junction_phases: bool = MISSING
traffic_lights_enabled: bool = MISSING
stop_signs_enabled: bool = MISSING
Expand All @@ -276,6 +284,7 @@ class DriveEnvConfig:
init_step: int = _constrained_field(NONNEGATIVE_INT_CONSTRAINT)
init_step_spread: bool = MISSING
init_step_min_horizon: int = _constrained_field(POSITIVE_INT_CONSTRAINT)
stagger_first_episode: bool = MISSING
control_mode: ControlMode = MISSING
sdc_controller: Controller = MISSING
non_sdc_controller: Controller = MISSING
Expand Down Expand Up @@ -311,6 +320,7 @@ class DriveEnvConfig:
reward_reverse: float = _constrained_field(FINITE_NUMBER_CONSTRAINT)
reward_timestep: float = _constrained_field(FINITE_NUMBER_CONSTRAINT)
reward_overspeed: float = _constrained_field(FINITE_NUMBER_CONSTRAINT)
overspeed_tolerance_mps: float = _constrained_field(NONNEGATIVE_NUMBER_CONSTRAINT)
reward_ade: float = _constrained_field(FINITE_NUMBER_CONSTRAINT)
map_dir: str = MISSING
num_maps: int = _constrained_field(POSITIVE_INT_CONSTRAINT)
Expand All @@ -319,6 +329,8 @@ class DriveEnvConfig:
obs_slots_boundary_n: int = _constrained_field(NONNEGATIVE_INT_CONSTRAINT)
obs_slots_partners_n: int = _constrained_field(NONNEGATIVE_INT_CONSTRAINT)
obs_partner_relative_velocity: bool = MISSING
obs_lane_heading_signed: bool = MISSING
obs_lane_speed_limit: bool = MISSING
obs_slots_traffic_controls_n: int = _constrained_field(NONNEGATIVE_INT_CONSTRAINT)
obs_dropout_lane: float = _constrained_field(PROBABILITY_CONSTRAINT)
obs_dropout_boundary: float = _constrained_field(PROBABILITY_CONSTRAINT)
Expand Down Expand Up @@ -392,6 +404,7 @@ class TrainingConfig:
final_model_name: str = _constrained_field(NONEMPTY_STRING_CONSTRAINT)
evaluation_interval_epochs: int | None = _constrained_field(POSITIVE_INT_CONSTRAINT)
evaluation_benchmarks: str | None = MISSING
cosim_debug_evals: bool = MISSING
torch_deterministic: bool = MISSING
cpu_offload: bool = MISSING
device: str | int = MISSING
Expand Down Expand Up @@ -466,6 +479,7 @@ class EvaluationConfig:
max_goal_spacing: float | None = _constrained_field(POSITIVE_NUMBER_CONSTRAINT)
obs_slots_partners_n: int | None = _constrained_field(POSITIVE_INT_CONSTRAINT)
disable_red_light_infractions: bool | None = MISSING
disable_stop_sign_infractions: bool | None = MISSING
output_name: str | None = MISSING
output_dir_name: str = _constrained_field(NONEMPTY_STRING_CONSTRAINT)
scenario_offset: int = _constrained_field(NONNEGATIVE_INT_CONSTRAINT)
Expand Down Expand Up @@ -605,8 +619,14 @@ def _validate_cross_field_constraints(config, context):
_raise_config_error(context, "env.init_step_spread", "is only supported in replay mode")
if env["init_step_spread"] and env["init_step_min_horizon"] >= env["scenario_length"]:
_raise_config_error(context, "env.init_step_min_horizon", "must be smaller than env.scenario_length")
if env["goal_source"] == "gt" and env["simulation_mode"] != "replay":
_raise_config_error(context, "env.goal_source", "'gt' is only supported in replay mode")
if env["goal_source"] in ("gt", "gt_map") and env["simulation_mode"] != "replay":
_raise_config_error(context, "env.goal_source", f"'{env['goal_source']}' is only supported in replay mode")
if env["stagger_first_episode"] and env["init_step"] + env["init_step_min_horizon"] > env["scenario_length"]:
_raise_config_error(
context,
"env.stagger_first_episode",
"requires env.init_step + env.init_step_min_horizon <= env.scenario_length",
)
if env["terminate_on_goal"] and (env["simulation_mode"] != "replay" or env["control_mode"] != "control_sdc_only"):
_raise_config_error(context, "env.terminate_on_goal", "requires replay mode with control_sdc_only")
if env.get("eval_mode") is not None and (
Expand Down
Empty file.
Loading
Loading