Skip to content

Adopt the best-launch training recipe as the default config; nightly derives from it#537

Open
eugenevinitsky wants to merge 10 commits into
3.0from
ev/mimolette-defaults
Open

Adopt the best-launch training recipe as the default config; nightly derives from it#537
eugenevinitsky wants to merge 10 commits into
3.0from
ev/mimolette-defaults

Conversation

@eugenevinitsky

@eugenevinitsky eugenevinitsky commented Jul 24, 2026

Copy link
Copy Markdown

What

  • pufferlib/config/puffer_drive.yaml defaults now carry the best-launch training recipe:
    • env: dt 0.3, 120 max agents/env, scenario_length 2560, resample every 256k steps, map cache on; goal_source: map with lane-distance obs, goal_speed 3.0, spacing up to 200 m; updated obs slots/ranges/norms, lane dropout 0.3 / boundary 0.4, lane stride 2; partner-blindness and phantom-braking perturbations on; reward conditioning + randomization on, lane_center 0.001.
    • policy: 3×1024 backbone, split actor/critic (1×256 heads), 128–256 encoder widths.
    • train: 3 update epochs, bfloat16, normalize_rewards: false, 500B-step schedule.
  • Defaults stay dev-sized so they run on-premise (per review): 1024 agents, 20 envs, 64k minibatch, compile: false. The full-scale knobs (3200 agents, 40 envs, 256k minibatch with 64k accumulation chunks, compile on) live in scripts/cluster_configs/nightly_best.yaml, which shrinks from ~110 override lines to scale + run-length + logging — the nightly now always trains whatever the default recipe is.
  • 05_inference.py notebook: the embedding heatmap cell now handles per-encoder embedding widths (the new encoders are heterogeneous; the old uniform-64 defaults were the only reason np.stack worked).
  • update-smoke-golden.yml now regenerates both goldens — drive_rollout_golden.json previously had no regeneration path, so any legitimate metric shift left the rollout smoke test permanently red.
  • single_agent_speed_run.yaml already pins its full recipe explicitly, so that launcher's behavior is unchanged.

Why

The best-known recipe lived only in a checkpoint's config.yaml and, approximately, in a 110-line nightly override file that had drifted from it (num_agents 4096 vs 3200, goal_speed 1000 vs 3, reward_goal 0.5 vs 1.0, blindness probs, minibatch sizing). Making it the default means puffer train puffer_drive is the best-launch recipe at dev scale, the nightly can't drift from it again, and future recipe improvements are one edit in one place.

Notes

  • Not adopted (infra/bookkeeping, not recipe): map_dir/num_maps (defaults stay on the 8 local CARLA maps), data_dir, checkpoint_interval.
  • Smoke goldens were regenerated in CI via [update-golden] — the recipe defaults (dt 0.3, map goal source, obs shaping) legitimately shift the golden metrics.
  • Follow-up issue Gigaflow reset: agents keep init positions between resamples; resample forces sync resets #540 tracks the reset/resample fixes discussed inline.
  • Nightly memory: the scale change (agents 4096→3200, vec.num_envs 20→40) shifts the worker/agent balance; launch_nightly_best.sh's default MEM=192gb likely still holds but the first night is worth watching.
  • All CI checks green (unit, C, notebooks, smoke incl. regenerated goldens).

🤖 Generated with Claude Code

Comment thread pufferlib/config/puffer_drive.yaml
@eugenevinitsky
eugenevinitsky force-pushed the ev/mimolette-defaults branch from 13ec391 to de369c7 Compare July 24, 2026 02:52
@vcharraut

Copy link
Copy Markdown
Collaborator

In my opinion the default config should run on premise on (almost) any machine to debug/dev purposes and we add the scale run to a different .yaml

Comment thread pufferlib/config/puffer_drive.yaml Outdated
precision: float32
total_timesteps: 10000000000
precision: bfloat16
total_timesteps: 62500000000

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

put to 500_000_000_000

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done — default train.total_timesteps is now 500_000_000_000 (nightly still overrides to a night-sized 10B).

eugenevinitsky and others added 3 commits July 26, 2026 17:51
puffer_drive.yaml defaults now match weights/mimolette/config.yaml (our
best model) for the full training recipe: env physics and scale (dt 0.3,
3200 agents, 120 max per env, scenario_length 2560), map goal source
with lane-distance obs, mimolette observation shaping and dropouts,
partner-blindness/phantom-braking perturbations, reward conditioning +
randomization, the 3x1024 split actor/critic policy, and the optimizer
recipe (256k minibatch with 64k accumulation chunks, 3 update epochs,
compiled bfloat16, no reward normalization, 62.5B-step schedule),
plus vec.num_envs 40.

Not adopted (infra/bookkeeping, not recipe): map_dir/num_maps (local
CARLA instead of the 72-map GCS set), data_dir, checkpoint_interval,
and keys absent from the 3.0 schema (traffic_control_scope).

nightly_best.yaml shrinks to run-scale and logging only — night-sized
10B timesteps, checkpoint interval, eval toggle, wandb — so the nightly
always trains the current default recipe. single_agent_speed_run.yaml
pins vec.num_envs=20, the one default it silently inherited.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The embedding-dim heatmap stacked pooled embeddings across encoders,
which requires every encoder to share one width. The mimolette policy
uses per-encoder widths (128/256), so NaN-pad rows to the widest
instead; imshow leaves the padding blank.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…te-golden]

Per review: the default config should run on-premise on (almost) any
machine. Defaults keep the mimolette recipe (env physics, goals,
observations, perturbations, rewards, policy architecture, precision)
but stay at dev scale: 1024 agents, 20 envs, 64k minibatch, compile
off. The scale knobs for a real training run (3200 agents, 40 envs,
256k minibatch with 64k accumulation, compile) move to
nightly_best.yaml. total_timesteps default is 500B per review.

The single_agent vec.num_envs pin is dropped — it existed only because
the default briefly moved to 40.

The [update-golden] tag regenerates the smoke goldens: the smoke config
pins its own scale but inherits the recipe defaults (dt 0.3, map goal
source, obs shaping), so the golden metrics legitimately shift.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@eugenevinitsky

eugenevinitsky commented Jul 26, 2026

Copy link
Copy Markdown
Author

Restructured per this thread: the defaults keep the mimolette recipe (env physics, goals, observations, perturbations, rewards, policy architecture) but stay dev-sized and the full values move to nightly best

github-actions Bot and others added 4 commits July 26, 2026 22:00
The workflow only refreshed drive_smoke_golden.json; the rollout golden
(drive_rollout_golden.json, added with test_drive_rollout) had no
regeneration path, so any legitimate metric shift left the rollout
smoke test permanently red. Run both golden tests in the regen
container, and commit/upload whichever files changed. The commit
message also stops naming the feature from the workflow's first use.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@eugenevinitsky eugenevinitsky changed the title Make the mimolette recipe the default config; nightly derives from it Adopt the best-launch training recipe as the default config; nightly derives from it Jul 26, 2026
Drop the 68 override keys that now just repeat puffer_drive.yaml
defaults; only genuine single-agent divergences remain (single Town10HD
map, 1 agent/env, single close goal, no partner/traffic obs, speed-run
reward weights, smaller shared-backbone policy, short schedule).
Verified the pruned overrides compose to an identical effective config,
modulo two trigger-prob knobs that are dead with their enable
probabilities at 0.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@eugenevinitsky
eugenevinitsky force-pushed the ev/mimolette-defaults branch from a182648 to 29bc59e Compare July 26, 2026 23:22
eugenevinitsky and others added 2 commits July 26, 2026 20:18
Port of the 2.0-lineage change: submit_cluster.py gains
--wandb-base-url/--wandb-entity flags exported as env vars in the
container command (not --args, whose ':' sweep splitting breaks URLs),
and both nightly launchers forward WANDB_BASE_URL/WANDB_ENTITY from the
launch environment. Lets a launch pin the wandb server + org (e.g.
api.wandb.ai / emerge_) over the container's self-hosted default.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
All evaluator sections in puffer_drive.yaml (validation_replay,
validation_gigaflow, dnf_triage) and the code fallback in
Evaluator._render_pass switch from egl/triage_html to obs_html.
validation_gigaflow drops its egl-only render_views and no longer
spawns the eight-way ffmpeg/EGL spike at eval time; the single-agent
launcher's obs_html override becomes the default and is removed. The
egl mp4-naming test pins render_backend=egl explicitly.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants