fix: align evals with applied policies - #3385
Merged
Merged
Conversation
mikasenghaas
commented
Aug 25, 2026
mikasenghaas
force-pushed
the
fix/eval-interval-step
branch
from
August 25, 2026 05:20
1ca45d7 to
9e327fd
Compare
mikasenghaas
marked this pull request as ready for review
August 25, 2026 05:23
samsja
previously approved these changes
Aug 25, 2026
mikasenghaas
marked this pull request as draft
August 25, 2026 05:39
mikasenghaas
force-pushed
the
fix/eval-interval-step
branch
from
August 25, 2026 05:48
9e327fd to
6ac8517
Compare
mikasenghaas
commented
Aug 25, 2026
mikasenghaas
force-pushed
the
fix/eval-interval-step
branch
from
August 25, 2026 18:26
6ac8517 to
b2c3581
Compare
mikasenghaas
marked this pull request as ready for review
August 25, 2026 18:27
mikasenghaas
force-pushed
the
fix/eval-interval-step
branch
from
August 25, 2026 18:53
b2c3581 to
37888bb
Compare
samsja
previously approved these changes
Aug 25, 2026
mikasenghaas
force-pushed
the
fix/eval-interval-step
branch
from
August 25, 2026 19:13
37888bb to
19fb92d
Compare
Trigger interval evals after inference applies the matching policy. Always broadcast and consume the final RL policy so final evals use the completed weights.
mikasenghaas
force-pushed
the
fix/eval-interval-step
branch
from
August 25, 2026 19:13
19fb92d to
5fa6b01
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 5fa6b01. Configure here.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
WeightWatcherupdate path. Advancepolicy.versionand trigger evals only after inference applies the weights.retrigger_on_resume=true.Verification
Before the fix, a 20-step reverse-text run with eval interval 1 reproduced the bug:
After the fix, this requested interval-10 run completed all 20 steps:
uv run rl @ examples/basic/reverse-text/rl.toml \ --orchestrator.eval.interval 10 \ --orchestrator.eval.num-examples 1 \ --orchestrator.eval.group-size 1 \ --orchestrator.eval.source '[{"name":"reverse-text-eval","env":{"taskset":{"id":"reverse-text"},"agent":{"harness":{"id":"null"},"runtime":{"type":"subprocess"}}}}]' \ --no-monitors.wandb --no-dashboardA two-step run without evals applied final policy v2 and exited cleanly. This verifies unconditional final broadcast and consumption.
Fresh and resumed two-step smokes verified the startup matrix:
retrigger_on_resume=falseskipped v2, then evaluated v3 and v4.retrigger_on_resume=trueevaluated v2, v3, and v4.After the final review fixes, a fresh interval-1 run evaluated v0, v1, and v2. A resume from v2 with
retrigger_on_resume=falseskipped only v2, then evaluated v3 and v4.Note
High Risk
Changes core RL orchestration around weight updates, rollout scheduling barriers, and eval timing—incorrect ordering could cause wrong-policy evals or inference crashes during weight swaps.
Overview
Fixes evals running against stale or wrong policy versions by tying eval triggers and
policy.versionto inference actually applying weights, not merely publishing them.Policy lifecycle:
WeightWatchernow advancespolicy.versiononly afterreceive()completes, routes startup sync throughsync_startup+ sharedon_updatehooks, and registers orchestrator hooks for eval and dispatch-gate refresh. Batch shipping and shutdown waits refer to inference-applied versions.Eval scheduling: Eval fires from
trigger_evalafter each applied policy (including startup v0 on fresh runs). Resume skips re-eval at the checkpoint step unlessretrigger_on_resume=true; final eval usesforceatmax_stepswithout a spurious step-21 epoch. The dispatcher blocks new scheduling across weight swaps viapolicy_update_pendingand a scheduling lock.Broadcast config: Removes
broadcast_finalandfinal_broadcast_version; the trainer always broadcasts every step including the final policy, and resume cleanup deletes broadcast dirs from the resume step onward so the startup handshake is rebuilt.Reviewed by Cursor Bugbot for commit 5fa6b01. Bugbot is set up for automated code reviews on this repo. Configure here.