feat(v1): resume dashboard counts the whole run, not just resumed rollouts#1892
Merged
Conversation
ApprovabilityVerdict: Needs human review 1 blocking correctness issue found. This PR modifies dashboard runtime behavior for resumed runs, and there is an unresolved review comment identifying a correctness issue where usage/time metrics would incorrectly display historical data rather than session-scoped data as intended. You can customize Macroscope's approvability policy. Learn more. |
Switch from the Baseline score-aggregate to Mika's approach: after rewrite_results leaves only the kept rows on disk, reload them as finished Trace objects (resume.load_kept, via read_traces + WireTask like replay) and fold them into the dashboard's `done` list. The whole run's counter, reward, err, and the per-component/usage/time breakdown then fall out of the existing code with no special-casing — format_mean and _breakdown revert to their pre-PR form. Note tokens/time are now cumulative (kept rollouts' original spend is included), not session-scoped. Only the --rich dashboard loads the traces. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
5fd4c14 to
0a3a1da
Compare
mikasenghaas
reviewed
Jul 8, 2026
mikasenghaas
approved these changes
Jul 8, 2026
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.
What
On
--resume, the live eval dashboard counted only the re-run rollouts and ignored the ones already kept on disk. This makes it reflect the whole run.The runner hands the dashboard only the owed (missing + errored) rollouts on resume, so:
Concretely, a 100-rollout run resumed with 40 kept / 60 re-run:
0/6060/6040/100100/100So the counter goes from
0/remainingtodone/all— it starts at40/100instead of0/60.How
Rather than keep score aggregates around, reload the kept traces once and treat them as finished rollouts (per review discussion):
resume.rewrite_resultsleaves only the kept (good) rows on disk,resume.load_keptreloads them as finishedTraces — viaread_traces+WireTask, the same offline-load pathreplayuses (no runtime, no tasksetTasktype needed).finished;Progressfolds them into itsdonelist (done = finished + this session's done) and adds them back into the total. Reward, err, and the per-component / usage / time breakdown then fall out of the existing code with no special-casing —format_meanand_breakdownare untouched.--richdashboard loads the traces (skipped otherwise); non-resume runs pass an empty list and are unchanged.Net +55/−11 across 3 files (vs. ~+236 for the earlier score-aggregate version).
Testing
Drove the resume path offline (no model needed): built real
Traces — with rewards, metrics, per-nodeusage, and timing — for a prior run, wrote them in the on-disk format, then ran the actualplan → rewrite_results → load_keptand renderedProgress. Observed session-only → whole-run:1/24/50.000.75(mean of[1,1,1,0])len3.001.50(mean of[0,1,2,3])100/20 · $0.0010400/80 · $0.0040(summed)generation 6sgeneration 3s(avg of[2,2,2,6])This also confirms
load_keptround-trips the full trace (nodes/usage/timing), not just scores.ruff check+ruff formatclean;ty checkreports no new diagnostics vs.main(load_keptmirrorsreplay's existingTrace[WireTask, state_cls(...)]pattern).tests/v1unit suite passes (53, non-e2e).--resumeagainst a live model (no endpoint available here); the runner wiring that callsload_keptand passesfinishedto the dashboard is exercised only by the piecewise test above, not a live run.🤖 Generated with Claude Code
Note
Include kept rollouts from resumed runs in eval dashboard counts and means
Baselinedataclass inresume.pythat aggregates non-errored kept rollouts (count, reward sum, per-key component sums);resume.plannow returns this alongside keep offsets and owed counts.format_meanto acceptbase_sum/base_nkwargs, folding prior rollouts into both the clean mean and the parenthesized global mean.Progressand_breakdowncomponents ineval.pyto accept and apply theBaseline, so counts, error rates, rewards, and per-key metrics reflect the entire run rather than only the current session.base_sum/base_nare unaffected.Macroscope summarized 3c764e2.
Note
Low Risk
Display and aggregation-only for the resume dashboard path;
format_meandefaults preserve existing callers, and persisted results logic is unchanged aside from reading reward/metric dicts when planning keeps.Overview
On
--resume, the rich eval dashboard now treats kept on-disk rollouts as part of the run for progress and scoring stats, instead of showing only the rollouts re-executed in the current session.resume.planreturns a newBaseline(count, summed headline reward, per-@reward/@metricsums) built while scanningresults.jsonlfor rows to keep. The runner passes that baseline into the dashboard.format_meanaccepts optionalbase_sum/base_nso error-corrected and parenthesized global means include those kept rows. Progress showskept+done / kept+total, and reward/err/breakdown reward-metric rows use the combined denominators. Usage and time in the breakdown stay session-only (no token/time re-derivation from disk). Non-resume runs are unchanged (empty baseline).Adds
tests/v1/test_resume_baseline.pyforformat_meanbaseline folding andplanaggregation (including group-scored incomplete groups).Reviewed by Cursor Bugbot for commit 3c764e2. Bugbot is set up for automated code reviews on this repo. Configure here.