Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
4753998
eval 0057 alpasim
Kait0 Oct 28, 2026
a7e4a86
eval 58
Kait0 Oct 28, 2026
86880ec
Speedup self-play eval and eval more
Kait0 Oct 28, 2026
2724db7
update parallel
Kait0 Oct 28, 2026
955b500
parallel eval.
Kait0 Oct 28, 2026
db4088c
match eval simulation length to gigaflow self-play eval
Kait0 Oct 28, 2026
8fb81a9
Try 128 envs.
Kait0 Oct 28, 2026
81b5649
k_scaled_0063 try 256 envs
Kait0 Oct 28, 2026
4c58619
bugfix with too many files
Kait0 Oct 28, 2026
d4e73ed
eval self-play
Kait0 Oct 29, 2026
a16a2d4
name
Kait0 Oct 29, 2026
890a6a1
Change red light behavior.
Kait0 Oct 29, 2026
8c447c3
test clipping lane widths
Kait0 Oct 29, 2026
9e2bebc
minor
Kait0 Oct 29, 2026
8d5fbed
minor
Kait0 Oct 29, 2026
a515da1
don't filter static objects that overlap with the street.
Kait0 Oct 29, 2026
2de26fa
test lane symetry and other vehicle stopped time 0.
Kait0 Oct 29, 2026
86b5504
update defaults
Kait0 Oct 29, 2026
dc9f14a
remove partner zero did not work
Kait0 Oct 29, 2026
c38bf96
update nuPlan to use the bike model optionally instead of perfect tra…
Kait0 Oct 29, 2026
b90490d
fix
Kait0 Oct 29, 2026
2a44546
nuplan comfort analysis script
Kait0 Oct 30, 2026
a3f0f00
nuPlan staging.
Kait0 Oct 30, 2026
82ca5da
reduce opencv threads
Kait0 Oct 30, 2026
f13b564
increase number of threads for nuPlan eval
Kait0 Oct 30, 2026
66e7f93
nuplan comfort controller changes
Kait0 Oct 30, 2026
592c5e8
update defaults to the best
Kait0 Oct 30, 2026
a44a5ec
new controller changes
Kait0 Oct 30, 2026
a1f0c1f
make direct control the default
Kait0 Oct 30, 2026
364664e
make backside and frontside trigger red light infraction
Kait0 Oct 30, 2026
84bab90
c hange rl logic
Kait0 Oct 31, 2026
41ebcce
changes to RL logic
Kait0 Nov 1, 2026
bd94273
68, 128 parallel envs per worker
Kait0 Nov 1, 2026
43ebf51
Cleanup nuPlan eval to produce less files.
Kait0 Nov 1, 2026
e207999
implemented remaining yellow light time for traffic lights
Kait0 Nov 2, 2026
fed1b1d
Try more partners in longest6
Kait0 Nov 3, 2026
550fd53
Add pedestrian s to training.
Kait0 Nov 3, 2026
f058547
speed up longest6 eval
Kait0 Nov 3, 2026
3cc2b6d
check that port range is free
Kait0 Nov 3, 2026
de8ac60
prevent auto requeue of longest6
Kait0 Nov 3, 2026
da199f0
Make a pedestrian distribution
Kait0 Nov 4, 2026
29e7dec
71 new pedestrian distribution
Kait0 Nov 4, 2026
92b3082
update longest6 harness
Kait0 Nov 5, 2026
082fde6
default to 71
Kait0 Nov 5, 2026
315ab40
added new maps
Kait0 Nov 5, 2026
1c79056
Fix wandb logging.
Kait0 Nov 5, 2026
2a92100
implement more pedestrian scenarios during train.
Kait0 Nov 5, 2026
34f8e37
nuplan lqr and ilqr option. CARLA tuned pedals converter to be gear a…
Kait0 Nov 6, 2026
cb394ea
also control the bicycles with the policy during forcast-.
Kait0 Nov 6, 2026
e4be043
Fix other vehicle forcast. change to manual gear and add reverse driv…
Kait0 Nov 6, 2026
b45c7ac
carla changes
Kait0 Nov 6, 2026
a253e4b
Train 3 seeds.
Kait0 Nov 6, 2026
875bd0a
update script
Kait0 Nov 6, 2026
5f6b267
update vizu
Kait0 Nov 6, 2026
7040c8d
make the best config the default.
Kait0 Nov 6, 2026
e0a04df
make pedal mode the default.
Kait0 Nov 8, 2026
137519c
precommit
Kait0 Nov 9, 2026
dcec4b3
cleanup nuPlan eval folder
Kait0 Nov 9, 2026
2431ffb
Clean up carla eval
Kait0 Nov 9, 2026
6f98efb
tidy alpasim
Kait0 Nov 9, 2026
18c8c5b
tidy self-play eval
Kait0 Nov 9, 2026
404b9eb
Added ensemble eval.
Kait0 Nov 9, 2026
0c16aac
add mean ensemble
Kait0 Nov 9, 2026
70b0035
Fable 5.2 is out. time to go through entire codebase again and fix al…
Kait0 Nov 9, 2026
297836d
3x smaller minibatch
Kait0 Nov 10, 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
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ PYTHON := .venv/bin/python
# sources, so `make test` rebuilds it only when a .c/.h file actually changed.
EXT_SUFFIX := $(shell $(PYTHON) -c "import sysconfig; print(sysconfig.get_config_var('EXT_SUFFIX'))" 2>/dev/null)
BINDING := pufferlib/ocean/drive/binding$(EXT_SUFFIX)
DRIVE_SOURCES := $(wildcard pufferlib/ocean/drive/*.c) $(wildcard pufferlib/ocean/drive/*.h) setup.py
DRIVE_SOURCES := $(wildcard pufferlib/ocean/drive/*.c) $(wildcard pufferlib/ocean/drive/*.h) pufferlib/ocean/env_binding.h setup.py

.PHONY: help test rebuild ensure-test-deps test-unit test-eval test-c test-notebooks test-docker-smoke

Expand Down
12 changes: 12 additions & 0 deletions data_utils/datasets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,3 +74,15 @@ carla_128_affine_zones_stop:
behind the k_scaled_004x runs.
license: >-
CARLA assets are CC BY 4.0 — attribution required.

carla_128_affine_zones_stop_ndshoulders_v20:
s3_uri: s3://pufferdrive-bins/carla/0.3.2/128_affine_zones_stop_ndshoulders_v20/
size: ~107 MB, 128 bins
public: true
description: >-
CARLA Towns 01-07/10HD as PufferDrive bins with 16 affine augmentations
each (flips, shears, scales), per-lane speed zones, stop signs and
shoulders outside junctions made off-road (map set v20). The training
set behind the runs from k_scaled_0067 on.
license: >-
CARLA assets are CC BY 4.0 — attribution required.
3 changes: 2 additions & 1 deletion pufferlib/config/evaluation/benchmark.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ env:
pose_noise_yaw_deg: 0.0
speed_limit_random_prob: 0.0
stagger_first_episode: false
scripted_pedestrian_ratio: 0.0

benchmarks:
- name: carla
Expand All @@ -51,7 +52,7 @@ benchmarks:
num_maps: 8
max_agents_per_env: 50
max_scenarios_per_batch: null
scenario_length: 6000
scenario_length: 9000 # 600 s at dt 0.0667, GIGAFLOW Table A4
control_mode: control_vehicles
map_dir: pufferlib/resources/drive/binaries/carla

Expand Down
35 changes: 34 additions & 1 deletion pufferlib/config/puffer_drive.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,23 @@ env:
yield_signs_enabled: false
# Skip red light violation detection (metrics, reward, behavior)
disable_red_light_infractions: false
# Red light violation = the stop line lies between the ego's tail clearance point (rear edge - 1 m, what CARLA's
# RunningRedLightTest scores) and its front edge while red, moving or standing: a yellow entry must clear the line
# by 1 m. Training-only margins (m): the front one makes the front edge stop that much earlier, the rear one would
# extend the tail clearance (0 = CARLA's clearance as is); eval and co-sim use the real edges
red_light_train_front_margin_m: 0.3
red_light_train_rear_margin_m: 0.0
# 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
# Training light cycles (s): green ~ U(green_min, 10), yellow ~ U(yellow_min, yellow_max), red ~ U(0.3, 10); eval runs a
# fixed 10 / 3 / 2 cycle. GIGAFLOW used U(1, 10) / U(1.5, 2.25) with a centre-crossing test; with CARLA's tail test the
# yellow must cover CARLA's 2 s (Leaderboard 1 scenarios 7-9) to 3.1 s (natural) or committed slow crossings become
# unavoidable violations, and CARLA has no green below 5 s
traffic_light_green_min_s: 3.0
traffic_light_yellow_min_s: 2.0
traffic_light_yellow_max_s: 3.0
# Share static map geometry (roads/grid/lane-graph) across envs using the same map
use_map_cache: true
# Load all configured maps before fork so workers inherit shared geometry
Expand Down Expand Up @@ -201,6 +214,9 @@ env:
# 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: true
obs_slots_traffic_controls_n: 4
# Append to every traffic-control row the seconds the light stays yellow / traffic_light_yellow_max_s (clipped at 1,
# 0 unless yellow); co-sims feed the simulator's own timer, clipped to the same training max
obs_traffic_light_yellow_remaining: false
# Fraction of segment observation slots to drop (reduces obs size)
obs_dropout_lane: 0.5
obs_dropout_boundary: 0.4
Expand All @@ -223,6 +239,9 @@ env:
eval_perceived_size_margin_m: 0.1
# Eval-only: partners longer than this (m) are observed as ceil(length / this) touching pieces (training max 7.0). 0 disables.
obs_partner_split_length_m: 0.0
# Eval-only: observed lane widths (m) are clipped to [min, max]; the CARLA training maps span 2.85-4.4 m. max 0 disables.
obs_lane_width_clip_min_m: 0.0
obs_lane_width_clip_max_m: 0.0
# Eval-only: while standing exactly still, |longitudinal jerk| below this (m/s^3) is zeroed
# so leftover mean-action jerk cannot creep the car. 0 disables.
eval_standstill_jerk_deadband_mps3: 0.0
Expand Down Expand Up @@ -254,6 +273,17 @@ env:
phantom_braking_duration_seconds: 3.0
# Zero the steering command while a phantom brake is active (false keeps the policy's steering)
phantom_braking_freeze_steering: false
# Scripted pedestrians: each env gets ceil(ratio * agents) walker slots (1.0-1.5 m boxes = CARLA walker plus the 0.8 m
# eval VRU pad). A slot appears beside a random moving car's lane, plays one behaviour and vanishes for 5-20 s:
# 40% pop-in crosser (CARLA Leaderboard 1.0 Scenario3): standing at the right kerb 10-17 m ahead, half a lane outside
# the road edge, waits 0-0.6 s, ramps over 0.3-0.7 s to 3.4 m/s + 0.4 m/s per lane (+-1) and crosses;
# 15% slow crosser: either kerb, 25-70 m ahead, waits 0-5 s, crosses at 0.8-2 m/s up to 34 deg off the perpendicular;
# 20% stander: either kerb, 15-60 m ahead, stands 8-25 s with a stopped time already running (0-60 s);
# 15% kerb walker: either kerb, walks 8-25 m along it at 0.7-1.7 m/s, with or against traffic, never on the road;
# 10% kerb stepper: pops in like a crosser, steps 0.5-1.5 m toward the road edge or away from it, stands 8-25 s.
# Shares and ranges are the PEDESTRIAN_* constants in constants.h. Scripted, never policy-controlled, no observations
# of their own; cars see them as partners and collide with them normally. 0 disables.
scripted_pedestrian_ratio: 0.0
policy:
# Encoder layer (per-encoder embedding width)
ego_input_size: 128
Expand Down Expand Up @@ -411,7 +441,7 @@ eval:
# 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>_.
# Results folder inside the run dir.
output_dir_name: eval
# First global scenario index this process evaluates; used to shard one benchmark across GPUs.
scenario_offset: 0
Expand All @@ -429,6 +459,9 @@ eval:
# Existing episode metrics CSV to replay without running the benchmark first.
failure_replay_csv: null
capture_observations: false
# Agents whose observations the replay pages keep: all, or infracting (agents with a collision, offroad, red light
# or stop sign infraction in the episode; the others' observation rows are zeroed, a 50-agent page shrinks ~4x).
capture_observations_agents: all
observation_replay_wave_size: 16
observation_replay_writer_count: 4
# Options: sample | mode | mean
Expand Down
11 changes: 11 additions & 0 deletions pufferlib/config_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -268,8 +268,13 @@ class DriveEnvConfig:
traffic_light_behavior: InfractionBehavior = MISSING
stop_sign_behavior: InfractionBehavior = MISSING
disable_red_light_infractions: bool = MISSING
red_light_train_front_margin_m: float = _constrained_field(NONNEGATIVE_NUMBER_CONSTRAINT)
red_light_train_rear_margin_m: float = _constrained_field(NONNEGATIVE_NUMBER_CONSTRAINT)
disable_stop_sign_infractions: bool = MISSING
traffic_light_junction_phases: bool = MISSING
traffic_light_green_min_s: float = _constrained_field(POSITIVE_NUMBER_CONSTRAINT)
traffic_light_yellow_min_s: float = _constrained_field(POSITIVE_NUMBER_CONSTRAINT)
traffic_light_yellow_max_s: float = _constrained_field(POSITIVE_NUMBER_CONSTRAINT)
traffic_lights_enabled: bool = MISSING
stop_signs_enabled: bool = MISSING
yield_signs_enabled: bool = MISSING
Expand Down Expand Up @@ -332,6 +337,7 @@ class DriveEnvConfig:
obs_lane_heading_signed: bool = MISSING
obs_lane_speed_limit: bool = MISSING
obs_slots_traffic_controls_n: int = _constrained_field(NONNEGATIVE_INT_CONSTRAINT)
obs_traffic_light_yellow_remaining: bool = MISSING
obs_dropout_lane: float = _constrained_field(PROBABILITY_CONSTRAINT)
obs_dropout_boundary: float = _constrained_field(PROBABILITY_CONSTRAINT)
obs_lane_stride: int = _constrained_field(POSITIVE_INT_CONSTRAINT)
Expand All @@ -347,6 +353,8 @@ class DriveEnvConfig:
obs_norm_z_m: float = _constrained_field(POSITIVE_NUMBER_CONSTRAINT)
eval_perceived_size_margin_m: float = _constrained_field(NONNEGATIVE_NUMBER_CONSTRAINT)
obs_partner_split_length_m: float = _constrained_field(NONNEGATIVE_NUMBER_CONSTRAINT)
obs_lane_width_clip_min_m: float = _constrained_field(NONNEGATIVE_NUMBER_CONSTRAINT)
obs_lane_width_clip_max_m: float = _constrained_field(NONNEGATIVE_NUMBER_CONSTRAINT)
eval_standstill_jerk_deadband_mps3: float = _constrained_field(NONNEGATIVE_NUMBER_CONSTRAINT)
obs_range_road_front_m: float = _constrained_field(POSITIVE_NUMBER_CONSTRAINT)
obs_range_road_behind_m: float = _constrained_field(POSITIVE_NUMBER_CONSTRAINT)
Expand All @@ -363,6 +371,7 @@ class DriveEnvConfig:
phantom_braking_trigger_prob: float = _constrained_field(PROBABILITY_CONSTRAINT)
phantom_braking_duration_seconds: float = _constrained_field(POSITIVE_NUMBER_CONSTRAINT)
phantom_braking_freeze_steering: bool = MISSING
scripted_pedestrian_ratio: float = _constrained_field(NONNEGATIVE_NUMBER_CONSTRAINT)

# Added by benchmark overlays after the base Hydra config is composed.
eval_mode: bool | int = 0
Expand Down Expand Up @@ -498,6 +507,8 @@ class EvaluationConfig:
max_rendered_failures: int | None = _constrained_field(POSITIVE_INT_CONSTRAINT)
failure_replay_csv: str | None = MISSING
capture_observations: bool = MISSING
# all | infracting: whose observations the replay pages keep (infracting zeroes the other agents' rows)
capture_observations_agents: str = "all"
observation_replay_wave_size: int = _constrained_field(POSITIVE_INT_CONSTRAINT)
observation_replay_writer_count: int = _constrained_field(POSITIVE_INT_CONSTRAINT)
action_selection: ActionSelection = MISSING
Expand Down
Loading
Loading