Skip to content

feat: hardcode rollout filters and zero-advantage drop - #3254

Draft
mikasenghaas wants to merge 4 commits into
mainfrom
feat/orchestrator-batching-cleanup
Draft

feat: hardcode rollout filters and zero-advantage drop#3254
mikasenghaas wants to merge 4 commits into
mainfrom
feat/orchestrator-batching-cleanup

Conversation

@mikasenghaas

@mikasenghaas mikasenghaas commented Aug 12, 2026

Copy link
Copy Markdown
Member

Summary

Orchestrator cleanup: batching stays batch_size + group_size, and everything between scoring and training is hardcoded.

  • Hardcode gibberish/repetition monitoring. The composable filter config (pre_batch_filters / post_batch_filters, discriminated FilterConfig union, per-slot enforce) is gone. filters.py is now three hardcoded checks with the old default thresholds as module constants. Gibberish and repetition detection are monitor-only: tracked per rollout in metrics, never dropped.
  • Hardcode zero-advantage filtering as a pre-batch drop. A rollout whose advantage stream is all zero is dropped before it takes a batch slot, so every batch fills with batch_size informative samples: the trained-on batch is predictable, and the per-step sampling time varies with the zero-advantage rate. orchestrator.count_zero_advantage_in_batch = true opts back into the old accounting (dropped rollouts still count toward batch_size — fixed sampling effort per step, variable trained-on samples). Echo keeps its zero-advantage rollouts via a new Algorithm.trains_on_zero_advantage class flag (its ce component trains observation tokens regardless of credit); opd/opsd assign no advantage and never match. The sink warns every 25 consecutive all-zero-advantage groups so a stalled batch fill is visible.
  • Simplify batching config. token_batch_size (the alternative rollout-count-free mode) and oversampling_factor (a max_inflight_episodes derivation) are removed. max_inflight_episodes defaults to batch_size; set it explicitly to oversample — configs that used a factor now carry the resolved value.
  • Flatten the check-verdict metric keys. {scope}/{subset}/{agent}/filters/<name>/mean{scope}/{subset}/{agent}/<name>/mean, next to the other per-trace verdicts (is_trainable, is_filtered).
  • Docs and the monitor-run skill are updated to match; the README also drops its AIPO mention.

Breaking

  • orchestrator.pre_batch_filters / orchestrator.post_batch_filters are removed. Gibberish/repetition run always in monitor mode; enforcement is no longer available (examples/advanced/glm-5.2/swe.toml previously enforced gibberish and now only monitors it). Zero-advantage dropping is always on; the old default budget accounting is available via count_zero_advantage_in_batch = true. Echo no longer needs a filter override.
  • The zero-advantage default moves from post-batch to pre-batch: dropped rollouts no longer consume batch slots, so a step samples more rollouts but always trains on batch_size informative samples.
  • orchestrator.token_batch_size is removed; batch_size is the only batching unit.
  • orchestrator.oversampling_factor is removed. Set max_inflight_episodes = batch_size x factor explicitly instead.
  • W&B keys pre_filters/all/dropped_rate and pre_filters/all/<name>/rate are gone, and the check verdicts drop their filters/ segment (.../filters/gibberish/mean.../gibberish/mean).

Verification

  • tests/unit (configs incl. parsing every checked-in TOML, orchestrator, utils) passes; test_qwen3_vl_e2e fails identically on main (pre-existing).
  • 5-step smoke run of configs/ci/integration/reverse-text/start.toml on 2 GPUs: full 128-rollout batches every step, reward improves 0.13 → 0.25, no errors, clean exit.

🤖 Generated with Claude Code

mikasenghaas and others added 3 commits August 12, 2026 19:01
Replace the composable pre/post-batch filter config with hardcoded
checks: gibberish and repetition detection are monitor-only metrics,
and zero-advantage rollouts drop before they consume batch budget.
Algorithms that train without credit (echo) declare
trains_on_zero_advantage to keep their rollouts;
count_zero_advantage_in_batch opts back into the fixed sampling
budget of the old default.

Remove rollout-based batching (batch_size, oversampling_factor):
a rollout is an arbitrary unit of learning signal — the same batch
size means very different step sizes across envs. token_batch_size
is now the only batching mode. Checked-in configs are converted as
batch_size x measured average tokens per rollout (from recent
nightly/ablation W&B runs; estimated where no runs exist).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Drop the per-config derivation comments and write the large ints
with underscore separators.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
batch_size and group_size stay the only batching knobs. Also drop
oversampling_factor: max_inflight_episodes defaults to batch_size,
and configs that oversampled now set it explicitly.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@mikasenghaas mikasenghaas changed the title feat: hardcode rollout filters and switch to token batching feat: hardcode rollout filters and zero-advantage drop Aug 12, 2026
The check verdicts log as {scope}/{subset}/{agent}/<name>/mean,
next to the other per-trace verdicts (is_trainable, is_filtered).

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.

1 participant