Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
127 commits
Select commit Hold shift + click to select a range
cd0a64a
Reapply "k_scaled_0045 reduce speed limit penalty by 30x"
Kait0 Oct 5, 2026
53692a9
update default values in config to latest training config. Add S3 upl…
Kait0 Oct 5, 2026
1ed2d30
Added Carla leaderboard 1.0 cosim. Speed up training with better comm…
Kait0 Oct 5, 2026
1567f6a
use double the envs on th elcuster
Kait0 Oct 5, 2026
82d0b2c
increase eval envs
Kait0 Oct 6, 2026
164891c
Add fused network. and tuning scripts.
Kait0 Oct 6, 2026
2fe6586
Add Damianos changes for Alpasim cosim.
Kait0 Oct 6, 2026
76579bd
rerun nuPlan
Kait0 Oct 7, 2026
f2dbb2d
Update H100 kernel tuning
Kait0 Oct 7, 2026
364d738
measure mfu on cluster
Kait0 Oct 7, 2026
bd95191
update kernel tuning H100
Kait0 Oct 7, 2026
e48a16d
update mfu bench
Kait0 Oct 7, 2026
aa9ab0b
fix longest6 eval
Kait0 Oct 7, 2026
110726c
update mfu bench
Kait0 Oct 7, 2026
ac785ab
speedup simulation code. set speed limit reward condition to max at e…
Kait0 Oct 7, 2026
5cf63db
fix alpasim eval
Kait0 Oct 7, 2026
0d6fd7e
update alpasim
Kait0 Oct 7, 2026
4954e2d
reeval model with speed limit compliance.
Kait0 Oct 7, 2026
51e861c
k_scaled_0046 500B + optimizations
Kait0 Oct 7, 2026
243f05e
fix leaderboard stop sign and red light bugs
Kait0 Oct 7, 2026
8a95cf4
change nurec folder
Kait0 Oct 8, 2026
4a38757
Merge branch '11_bernhard_dev' of https://github.com/Emerge-Lab/Puffe…
Kait0 Oct 8, 2026
9a16107
add defaults
Kait0 Oct 8, 2026
87d70c1
fix leaderboard 2.0 red light lines
Kait0 Oct 8, 2026
c09b879
fix red light issue and shadow env bug
Kait0 Oct 8, 2026
ff9de50
add pos of infraction to html renderer
Kait0 Oct 8, 2026
2914067
fix alpasim script
Kait0 Oct 8, 2026
8e89492
new alpasim fix
Kait0 Oct 8, 2026
a8d19f9
update alpasim script
Kait0 Oct 8, 2026
e1e8a80
remove obsolete comment
Kait0 Oct 8, 2026
8e9ca63
alpasim model 45
Kait0 Oct 8, 2026
f30d6c9
update train script.
Kait0 Oct 8, 2026
493c511
render eval for alpasim
Kait0 Oct 8, 2026
6d8c9be
Clarify partner blindness behavior in comments and update visibility …
vcharraut Oct 1, 2026
2116363
Update partner blindness comments and logic for visibility corridor
vcharraut Oct 2, 2026
c800540
update maps to exclude shoulder lanes outside intersections.
Kait0 Oct 8, 2026
98128b5
update path
Kait0 Oct 9, 2026
721b79d
remove nuPlan floor and add an option to increase pedestrian size by …
Kait0 Oct 9, 2026
cd8941c
remove pedestrian floor.
Kait0 Oct 9, 2026
16b693a
rerun alpasim with goal radius 2
Kait0 Oct 10, 2026
ea45faf
fix longest6 bug, fix vizu bug, fix bug of stride 2 for center lines.
Kait0 Oct 12, 2026
9fd976f
Merge branch '11_bernhard_dev' of https://github.com/Emerge-Lab/Puffe…
Kait0 Oct 12, 2026
0dbc569
remove uneccesary alpasim logs
Kait0 Oct 12, 2026
805fa56
visu fixes, and build carla eval hack to set speed limits to 20 km/h…
Kait0 Oct 12, 2026
ff889b2
Merge remote-tracking branch 'origin/vcha/partner-blindness-corridor'…
Kait0 Oct 12, 2026
96c200d
update map to fix shoulders in intersections. add blind agents corrid…
Kait0 Oct 12, 2026
7e38f39
0048
Kait0 Oct 12, 2026
7c22e96
fix unit tests.
Kait0 Oct 12, 2026
c7c6c37
index.html for alpasim
Kait0 Oct 12, 2026
46db9ef
tidy up alpasim eval after the run
Kait0 Oct 12, 2026
7700804
change stop signs in alpasim maps
Kait0 Oct 12, 2026
34551d3
fix compiler warning
Kait0 Oct 13, 2026
19f635d
format only
Kait0 Oct 13, 2026
a86953c
Fix problem with triton missing in the golden
Kait0 Oct 13, 2026
c034e08
update golden
Kait0 Oct 13, 2026
d3bdf0b
Make pedestrian change optional and test it. Fix bug in maps.
Kait0 Oct 14, 2026
e79f070
0049 fix map and revert partner blindness feature.
Kait0 Oct 14, 2026
51fe749
Added 3D to Html visualizer and fixed height bugs in the maps.
Kait0 Oct 14, 2026
b29c648
remove pedestrian hack that diod not work
Kait0 Oct 15, 2026
e592eb7
Turn off rendering on longest 6 v1 eval
Kait0 Oct 15, 2026
a3f529f
speed up longest6 eval.
Kait0 Oct 15, 2026
8fd0e0b
speed up longest6 v2
Kait0 Oct 15, 2026
0ae70bf
Small speedups in the simulation using
Kait0 Oct 15, 2026
b92abdc
update mfu script-
Kait0 Oct 15, 2026
471980a
k_scaled_0050 5% always blind agents.
Kait0 Oct 18, 2026
4d30f4b
Fix small bug with comfort penalty and red light off at end of episode
Kait0 Oct 19, 2026
1f88acf
Merge branch '11_bernhard_dev' of https://github.com/Emerge-Lab/Puffe…
Kait0 Oct 19, 2026
1029595
fix eval crash
Kait0 Oct 20, 2026
aaef649
formatting.
Kait0 Oct 20, 2026
07ac7be
fix compiler warnings.
Kait0 Oct 20, 2026
a35ab41
add missing dependency.
Kait0 Oct 20, 2026
e657410
update golden
Kait0 Oct 20, 2026
7466c6d
fix longest6v1 script for better error handling.
Kait0 Oct 20, 2026
abbb535
script to finish a longest6v1 eval locally.
Kait0 Oct 20, 2026
d3ac30d
update scripts to work on both clusters
Kait0 Oct 25, 2026
8d151f3
add file
Kait0 Oct 25, 2026
e87fc57
scripts/kesai: run 0051
Kait0 Oct 25, 2026
d6db9e9
scripts/kesai: NCCL check, no RoCE on kesai yet
Kait0 Oct 25, 2026
f094ceb
scripts/kesai: run 0052, high partition note
Kait0 Oct 25, 2026
a6aa6b1
fused slot encoder: RTX PRO 6000 config with device-name lookup; scri…
Kait0 Oct 25, 2026
82fefa4
MFU: look up the bf16 peak by device name, not compute capability
Kait0 Oct 25, 2026
0f66175
scripts/kesai: RUN_NAME and ROLLOUT_DTYPE overridable in 3_train, wor…
Kait0 Oct 25, 2026
b2b1613
longest6 evals: 3 traffic-manager seeds per route, CaRL/garage protocol
Kait0 Oct 26, 2026
07f86ea
nuPlan eval on kesai: NO_TRAIN build, NUPLAN_EXP_ROOT default
Kait0 Oct 26, 2026
5f13d0b
epoch=1 test
Kait0 Oct 26, 2026
ba624af
k_scaled_0055_1000 closer to gigaflow settings
Kait0 Oct 27, 2026
b159608
use 1 node instead
Kait0 Oct 27, 2026
cc0ae25
tuning script.
Kait0 Oct 27, 2026
1e51695
Update log names and fix leaderboard
Kait0 Oct 27, 2026
9a8a476
precommit and test 1200 episode length.
Kait0 Oct 27, 2026
7a00406
Support alpasim enroot.
Kait0 Oct 27, 2026
79d62b2
optimization
Kait0 Oct 27, 2026
fa67b14
alpasim
Kait0 Oct 27, 2026
14b647c
add measure peak
Kait0 Oct 27, 2026
91aaba6
Add numa checks for pro 6000 nodes
Kait0 Oct 27, 2026
3b2226f
fix
Kait0 Oct 27, 2026
717c185
update numa check
Kait0 Oct 27, 2026
c37343d
update mfu bench
Kait0 Oct 27, 2026
9c39813
MORE MEASUREMENTS
Kait0 Oct 27, 2026
152468e
measurements.
Kait0 Oct 27, 2026
87e694c
upload
Kait0 Oct 27, 2026
4dec1da
precommit
Kait0 Oct 27, 2026
7e2b610
code review
Kait0 Oct 27, 2026
3db6e08
change default value
Kait0 Oct 27, 2026
038b272
fix leftover std on 1 sample
Kait0 Oct 27, 2026
213855c
fix alpasim
Kait0 Oct 27, 2026
93c2d2c
git commit -m "Regenerate train smoke golden for partner-blindness de…
Kait0 Oct 27, 2026
694c63e
update
Kait0 Oct 27, 2026
5f9c9e7
update
Kait0 Oct 27, 2026
ca54145
do some kernel optimizations.
Kait0 Oct 27, 2026
9e42927
alpasim update
Kait0 Oct 27, 2026
5b82726
alpasim
Kait0 Oct 27, 2026
e902b2a
update comments
Kait0 Oct 27, 2026
8dda8c6
more benchmarking
Kait0 Oct 27, 2026
28125d3
tune encoder
Kait0 Oct 27, 2026
ca2e195
update alpasim
Kait0 Oct 27, 2026
9ff083e
code review "Reject unindexable road segments at load
Kait0 Oct 27, 2026
d6ca72e
kernel speedup
Kait0 Oct 27, 2026
2e30ce5
alpasim kesai fix
Kait0 Oct 27, 2026
7f8967a
make all scripts numa aware
Kait0 Oct 27, 2026
30b0cf6
partial alpasim runs
Kait0 Oct 27, 2026
ba751c5
update
Kait0 Oct 27, 2026
066b012
eval finished model
Kait0 Oct 27, 2026
41afae1
eval 0059 on alpasim
Kait0 Oct 28, 2026
cbd09e0
minor
Kait0 Oct 28, 2026
420126b
run ablation on Scaleway.
Kait0 Oct 28, 2026
9a141e8
update default values with best config.
Kait0 Oct 28, 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 README.md
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ To add a metric to the report: add its key to `TREND_METRICS` /
| `reward_vel_align` | `1.0` | Speed matching road limit |
| `reward_lane_center` | `0.0038` | Lane centering |
| `reward_stop_line` | `1.0` | Stop line penalty |
| `reward_overspeed` | `0.05` | Speeding penalty |
| `reward_overspeed` | `0.005` | Speeding penalty |

### `train` — PPO

Expand Down
12 changes: 12 additions & 0 deletions data_utils/datasets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,15 @@ nuplan_val:
CC BY-NC-SA 4.0 (nuPlan, Motional) — non-commercial use only, attribution
required, share-alike. Redistribute only under this same license and keep
this notice with any copy.

carla_128_affine_zones_stop:
s3_uri: s3://pufferdrive-bins/carla/0.3.2/128_affine_zones_stop/
size: ~106 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 the
0.1 polyline tolerance (123Drive mapforge at v0.3.2-19). The training set
behind the k_scaled_004x runs.
license: >-
CARLA assets are CC BY 4.0 — attribution required.
4 changes: 4 additions & 0 deletions notebooks/01_observations.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@
obs_slots_traffic_controls_n=env.obs_slots_traffic_controls_n,
obs_dropout_lane=env.obs_dropout_lane,
obs_dropout_boundary=env.obs_dropout_boundary,
obs_partner_relative_velocity=env.obs_partner_relative_velocity,
obs_lane_speed_limit=env.obs_lane_speed_limit,
)
print(f"ego: {ego.shape} = {ego}")
print(f"target: {target.shape}")
Expand Down Expand Up @@ -283,6 +285,8 @@
obs_slots_traffic_controls_n=env.obs_slots_traffic_controls_n,
obs_dropout_lane=env.obs_dropout_lane,
obs_dropout_boundary=env.obs_dropout_boundary,
obs_partner_relative_velocity=env.obs_partner_relative_velocity,
obs_lane_speed_limit=env.obs_lane_speed_limit,
obs_lane_stride=env.obs_lane_stride,
obs_boundary_stride=env.obs_boundary_stride,
obs_goal_lane_distance=env.obs_goal_lane_distance,
Expand Down
18 changes: 17 additions & 1 deletion notebooks/05_inference.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,8 @@ def run_rollout(env, policy, action_selection=ACTION_SELECT_SAMPLE, horizon=HORI
obs_slots_boundary_n=env.obs_slots_boundary_n,
obs_dropout_lane=env.obs_dropout_lane,
obs_dropout_boundary=env.obs_dropout_boundary,
obs_partner_relative_velocity=env.obs_partner_relative_velocity,
obs_lane_speed_limit=env.obs_lane_speed_limit,
obs_lane_stride=env.obs_lane_stride,
obs_boundary_stride=env.obs_boundary_stride,
obs_slots_traffic_controls_n=env.obs_slots_traffic_controls_n,
Expand Down Expand Up @@ -241,6 +243,8 @@ def run_rollout(env, policy, action_selection=ACTION_SELECT_SAMPLE, horizon=HORI
obs_slots_boundary_n=env.obs_slots_boundary_n,
obs_dropout_lane=env.obs_dropout_lane,
obs_dropout_boundary=env.obs_dropout_boundary,
obs_partner_relative_velocity=env.obs_partner_relative_velocity,
obs_lane_speed_limit=env.obs_lane_speed_limit,
obs_slots_traffic_controls_n=env.obs_slots_traffic_controls_n,
)
ego_features_over_time.append(ego)
Expand Down Expand Up @@ -290,6 +294,8 @@ def run_rollout(env, policy, action_selection=ACTION_SELECT_SAMPLE, horizon=HORI
obs_slots_boundary_n=env.obs_slots_boundary_n,
obs_dropout_lane=env.obs_dropout_lane,
obs_dropout_boundary=env.obs_dropout_boundary,
obs_partner_relative_velocity=env.obs_partner_relative_velocity,
obs_lane_speed_limit=env.obs_lane_speed_limit,
obs_slots_traffic_controls_n=env.obs_slots_traffic_controls_n,
)

Expand Down Expand Up @@ -364,6 +370,8 @@ def layer_stats(name, arr):
"sim_speed_signed",
"seconds_stopped",
]
if env.obs_partner_relative_velocity:
partner_labels += ["rel_vx", "rel_vy"]
for p in range(min(int(n_visible), 5)):
vals = ", ".join(f"{partner_labels[j]}={partners[p, j]:.3f}" for j in range(env.partner_features))
print(f" [{p}] {vals}")
Expand Down Expand Up @@ -477,6 +485,8 @@ def unpack_all_timesteps(bufs, agent_idx):
obs_slots_boundary_n=env.obs_slots_boundary_n,
obs_dropout_lane=env.obs_dropout_lane,
obs_dropout_boundary=env.obs_dropout_boundary,
obs_partner_relative_velocity=env.obs_partner_relative_velocity,
obs_lane_speed_limit=env.obs_lane_speed_limit,
obs_slots_traffic_controls_n=env.obs_slots_traffic_controls_n,
)
egos.append(ego)
Expand Down Expand Up @@ -554,6 +564,8 @@ def unpack_all_timesteps(bufs, agent_idx):
obs_slots_boundary_n=env.obs_slots_boundary_n,
obs_dropout_lane=env.obs_dropout_lane,
obs_dropout_boundary=env.obs_dropout_boundary,
obs_partner_relative_velocity=env.obs_partner_relative_velocity,
obs_lane_speed_limit=env.obs_lane_speed_limit,
obs_slots_traffic_controls_n=env.obs_slots_traffic_controls_n,
)
dists = np.sqrt(part[:, 0] ** 2 + part[:, 1] ** 2)
Expand Down Expand Up @@ -581,6 +593,8 @@ def unpack_all_timesteps(bufs, agent_idx):
obs_slots_boundary_n=env.obs_slots_boundary_n,
obs_dropout_lane=env.obs_dropout_lane,
obs_dropout_boundary=env.obs_dropout_boundary,
obs_partner_relative_velocity=env.obs_partner_relative_velocity,
obs_lane_speed_limit=env.obs_lane_speed_limit,
obs_slots_traffic_controls_n=env.obs_slots_traffic_controls_n,
)

Expand Down Expand Up @@ -644,7 +658,7 @@ def unpack_all_timesteps(bufs, agent_idx):
for i in range(partners.shape[0]):
if np.allclose(partners[i], 0):
continue
rx, ry, rz, length, width, hc, hs, speed, _ = partners[i]
rx, ry, rz, length, width, hc, hs, speed = partners[i][:8]
heading = np.arctan2(hs, hc)
rect = Rectangle(
(-length / 2, -width / 2), length, width, facecolor="orange", edgecolor="black", alpha=0.6, zorder=9
Expand Down Expand Up @@ -791,6 +805,8 @@ def unpack_all_timesteps(bufs, agent_idx):
"sim_speed_signed",
"seconds_stopped",
]
if env.obs_partner_relative_velocity:
partner_labels += ["rel_vx", "rel_vy"]
obs_slots_partners_n = env.obs_slots_partners_n
pf = env.partner_features

Expand Down
4 changes: 3 additions & 1 deletion pufferlib/config/evaluation/benchmark.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ env:
reward_stop_line: 1.0
reward_ade: 0.0
reward_goal: 1.0
reward_overspeed: 0.05
reward_overspeed: 0.1 # training-range max (REWARD_BOUNDS)
reward_comfort: 0.05
reward_velocity: 0.0025
reward_lane_align: 0.025
Expand All @@ -28,7 +28,9 @@ env:
obs_dropout_lane: 0.0
obs_dropout_boundary: 0.0
partner_blindness_prob: 0.0
partner_blindness_prob_min: 0.0
partner_blindness_trigger_prob: 0.0
partner_blindness_time_fraction_max: 0.0
phantom_braking_prob: 0.0
phantom_braking_trigger_prob: 0.0
use_neighbor_cache: true
Expand Down
58 changes: 37 additions & 21 deletions pufferlib/config/puffer_drive.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,19 +57,19 @@ env:
# 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
conditioning_speed_scale: 2.0
# 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
spawn_lateral_offset_max_frac: 1.0
spawn_heading_max_deg: 30.0
# 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
pose_noise_xy_m: 0.025
pose_noise_yaw_deg: 0.25
# 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_prob: 1.0
speed_limit_random_delta_mps: 9.72
speed_limit_random_min_mps: 1.39
speed_limit_random_max_mps: 36.11
Expand All @@ -83,7 +83,7 @@ env:
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
stop_signs_enabled: true
yield_signs_enabled: false
# Skip red light violation detection (metrics, reward, behavior)
disable_red_light_infractions: false
Expand All @@ -94,13 +94,13 @@ env:
# 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
preload_map_cache: false
preload_map_cache: true
# Precompute neighboring road entities for observation queries
use_neighbor_cache: true
# Number of steps before reset; keep it off multiples of train.bptt_horizon so episode ends don't all land on the unused last buffer slot
scenario_length: 2500
scenario_length: 1200
# Frequency of resampling scenario (in steps), 0 to disable
resample_frequency: 256000
resample_frequency: 0
# End the episode early when too many agents are inactive; otherwise use scenario_length
termination_mode: true
# Ratio of inactive agents (stopped/removed) that triggers early reset
Expand Down Expand Up @@ -152,9 +152,9 @@ env:
# Maximum speed at final waypoint to count goal reward
goal_speed: 3.0
# true: goal-speed coef ~ U(0, 20) per agent under reward_randomization; false: pinned to goal_speed (GIGAFLOW v_goal = 3)
goal_speed_randomization: true
goal_speed_randomization: false
# true: the final goal is only consumed below goal speed (GIGAFLOW R_goal); false: consumed on entry, reward gated
goal_reach_requires_speed: false
goal_reach_requires_speed: true
# Number of target waypoints in the observation (including goal)
num_goals: 3
# Waypoint spacing range in meters when building path
Expand All @@ -179,7 +179,7 @@ env:
reward_velocity: 0.0025
reward_reverse: 0.005
reward_timestep: 2.5e-05
reward_overspeed: 0.05
reward_overspeed: 0.005
# m/s above the lane limit before the overspeed penalty fires
overspeed_tolerance_mps: 0.0
reward_ade: 0.0
Expand All @@ -195,18 +195,20 @@ env:
obs_slots_boundary_n: 50
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
obs_partner_relative_velocity: true
# Ego lane-angle slot: true = signed heading error theta_f / pi (GIGAFLOW B.1), false = cos(theta_f)
obs_lane_heading_signed: false
obs_lane_heading_signed: true
# 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_lane_speed_limit: true
obs_slots_traffic_controls_n: 4
# Fraction of segment observation slots to drop (reduces obs size)
obs_dropout_lane: 0.5
obs_dropout_boundary: 0.4
# Stride for lane and boundary segments; 1 means use every segment, 2 means use every other segment, etc.
obs_lane_stride: 2
obs_boundary_stride: 1
# true: strided-out segments merge into one chord so polylines stay connected; false = pre-2026-10-12 gaps
obs_stride_merge_segments: true
# --- Observation normalization ---
obs_norm_speed_mps: 60.0
# num_goals * max_goal_spacing; goals beyond this collapse to a unit direction vector
Expand All @@ -219,6 +221,8 @@ env:
obs_norm_z_m: 10.0
# --- Eval-only ---
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: 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 All @@ -230,12 +234,18 @@ env:
obs_range_traffic_control_m: 200.0
# --- Robustness features---
# Erratic agents are selected once per episode; masked out of the PPO rollout buffer.
# Upper bound of the per-episode blind-agent rate; each episode draws its rate uniformly from [0, this]
# Upper bound of the per-episode blind-agent rate; each episode draws its rate uniformly from [partner_blindness_prob_min, this]
partner_blindness_prob: 0.05
# Per-step probability that a flagged blind-partner agent zeros out its partner observations
partner_blindness_trigger_prob: 0.03
# Lower bound of the per-episode blind-agent rate
partner_blindness_prob_min: 0.05
# Per-step probability that a flagged blind-partner agent restricts its partner observations
partner_blindness_trigger_prob: 1.0
# Duration in seconds of partner blindness once triggered
partner_blindness_duration_seconds: 3.0
# Blind agents keep the partners in their forward corridor (false: they see no partners at all, pre-2026-10-12 rule)
partner_blindness_corridor: false
# 0 disables; else each blind agent draws its share of time spent blind uniformly from [share set by trigger prob and duration, this]; 1.0 = blind every step
partner_blindness_time_fraction_max: 0.0
# Upper bound of the per-episode phantom-braker rate; each episode draws its rate uniformly from [0, this]
phantom_braking_prob: 0.1
# Per-step probability that a flagged phantom-braker actually initiates a brake window
Expand All @@ -255,7 +265,7 @@ policy:
# Encoder activation - options: "relu", "tanh", "gelu"
encoder_activation: relu
encoder_layer_norm: true
mask_padded_features: false
mask_padded_features: true
# Shared backbone layer
backbone_hidden_size: 1024
backbone_num_layers: 3
Expand All @@ -271,7 +281,9 @@ policy:
critic_num_layers: 1
critic_head_layer_norm: false
# Run the actor/critic heads in float32 under bf16 autocast (backbone stays bf16)
fp32_heads: false
fp32_heads: true
# Fused Triton kernels for the per-slot encoders and their max-pool (same bf16 math, fewer activation bytes)
fused_slot_encoder: true
# Dual or shared actor-critic backbone
shared_network: false
action_type: discrete
Expand All @@ -297,7 +309,7 @@ train:
anneal_lr: true
precision: bfloat16
# false: pure float32 matmuls/convs (no TensorFloat-32); requires precision float32
tf32: true
tf32: false
rollout_dtype: float32
total_timesteps: 500000000000
learning_rate: 0.0005
Expand Down Expand Up @@ -333,7 +345,7 @@ train:
# Accumulate gradients above this size
max_minibatch_size: 65536
bptt_horizon: 128
compile: false
compile: true
compile_mode: default
compile_fullgraph: false
vtrace_rho_clip: 1
Expand All @@ -349,6 +361,10 @@ train:
# Rendering options
render: false
render_interval: 1000
# Training maps per render pass, a seeded random subset; null renders every map
render_num_maps: null
# Stop after this many epochs in this process (debug/render runs); null runs to total_timesteps
stop_after_epochs: null
sweep:
method: Protein
metric: score
Expand Down
14 changes: 13 additions & 1 deletion pufferlib/config_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,7 @@ class DriveEnvConfig:
obs_dropout_boundary: float = _constrained_field(PROBABILITY_CONSTRAINT)
obs_lane_stride: int = _constrained_field(POSITIVE_INT_CONSTRAINT)
obs_boundary_stride: int = _constrained_field(POSITIVE_INT_CONSTRAINT)
obs_stride_merge_segments: bool = MISSING
obs_norm_speed_mps: float = _constrained_field(POSITIVE_NUMBER_CONSTRAINT)
obs_norm_goal_offset_m: float = _constrained_field(POSITIVE_NUMBER_CONSTRAINT)
obs_norm_xy_offset_m: float = _constrained_field(POSITIVE_NUMBER_CONSTRAINT)
Expand All @@ -345,15 +346,19 @@ class DriveEnvConfig:
obs_norm_road_seg_width_m: float = _constrained_field(POSITIVE_NUMBER_CONSTRAINT)
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)
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)
obs_range_road_side_m: float = _constrained_field(POSITIVE_NUMBER_CONSTRAINT)
obs_range_partner_m: float = _constrained_field(POSITIVE_NUMBER_CONSTRAINT)
obs_range_traffic_control_m: float = _constrained_field(POSITIVE_NUMBER_CONSTRAINT)
partner_blindness_prob: float = _constrained_field(PROBABILITY_CONSTRAINT)
partner_blindness_prob_min: float = _constrained_field(PROBABILITY_CONSTRAINT)
partner_blindness_trigger_prob: float = _constrained_field(PROBABILITY_CONSTRAINT)
partner_blindness_duration_seconds: float = _constrained_field(POSITIVE_NUMBER_CONSTRAINT)
partner_blindness_corridor: bool = MISSING
partner_blindness_time_fraction_max: float = _constrained_field(PROBABILITY_CONSTRAINT)
phantom_braking_prob: float = _constrained_field(PROBABILITY_CONSTRAINT)
phantom_braking_trigger_prob: float = _constrained_field(PROBABILITY_CONSTRAINT)
phantom_braking_duration_seconds: float = _constrained_field(POSITIVE_NUMBER_CONSTRAINT)
Expand Down Expand Up @@ -386,6 +391,7 @@ class DrivePolicyConfig:
critic_num_layers: int = _constrained_field(NONNEGATIVE_INT_CONSTRAINT)
critic_head_layer_norm: bool = MISSING
fp32_heads: bool = MISSING
fused_slot_encoder: bool = False
shared_network: bool = MISSING
action_type: ActionType = MISSING

Expand Down Expand Up @@ -414,7 +420,7 @@ class TrainingConfig:
tf32: bool = MISSING
rollout_dtype: RolloutDtype = MISSING
total_timesteps: int = _constrained_field(POSITIVE_INT_CONSTRAINT)
learning_rate: float = _constrained_field(POSITIVE_NUMBER_CONSTRAINT)
learning_rate: float = _constrained_field(NONNEGATIVE_NUMBER_CONSTRAINT)
gamma: float = _constrained_field(PROBABILITY_CONSTRAINT)
gae_lambda: float = _constrained_field(PROBABILITY_CONSTRAINT)
update_epochs: int = _constrained_field(POSITIVE_INT_CONSTRAINT)
Expand Down Expand Up @@ -454,6 +460,8 @@ class TrainingConfig:
adv_filter_leak_fraction: float = _constrained_field(PROBABILITY_CONSTRAINT)
render: bool = MISSING
render_interval: int = _constrained_field(POSITIVE_INT_CONSTRAINT)
render_num_maps: int | None = _constrained_field(POSITIVE_INT_CONSTRAINT)
stop_after_epochs: int | None = _constrained_field(POSITIVE_INT_CONSTRAINT)
# Derived by load_config from rnn_name and intentionally absent from YAML.
use_rnn: bool = MISSING

Expand Down Expand Up @@ -610,6 +618,8 @@ def _validate_cross_field_constraints(config, context):
_raise_config_error(context, "env.spawn_initial_speed", "must not exceed env.base_max_speed_mps")
if env["min_goal_spacing"] > env["max_goal_spacing"]:
_raise_config_error(context, "env.min_goal_spacing", "must not exceed env.max_goal_spacing")
if env["partner_blindness_prob_min"] > env["partner_blindness_prob"]:
_raise_config_error(context, "env.partner_blindness_prob_min", "must not exceed env.partner_blindness_prob")
if env["preload_map_cache"] and not env["use_map_cache"]:
_raise_config_error(context, "env.preload_map_cache", "requires env.use_map_cache to be true")

Expand Down Expand Up @@ -672,6 +682,8 @@ def _validate_cross_field_constraints(config, context):
not isinstance(evaluation_benchmarks, str) or not evaluation_benchmarks.strip()
):
_raise_config_error(context, "train.evaluation_benchmarks", "must be a non-empty string")
if train["render_num_maps"] is not None and train["render_num_maps"] > config["env"]["num_maps"]:
_raise_config_error(context, "train.render_num_maps", "must not exceed env.num_maps")
if not context.startswith("evaluation") and context != "simulation profiling":
for field_name in ("batch_size", "bptt_horizon"):
if train[field_name] != "auto":
Expand Down
Loading
Loading