Repository navigation
Det Sweep: a shard proves its longest case first (Part of #5882) - #5947
Merged
Merged
Conversation
det_port.py run proved a shard's cases in name order (ThreadPoolExecutor.map), so a long case could start last and hold the shard while the other workers idled. It starts them longest first now, by the same recorded durations the shards are balanced by (an unmeasured case weighs the median). summary.json keeps its order. Simulated on the current plan with det_sweep_durations.json, 4 workers a shard: the six det shards 1301 s -> 1136 s of sweep (-13%), all twelve 4478 -> 4210 s (-6%). A 3-case sweep against current main: SAME verdicts, outputs, coverage and files. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01E977ZMkfHVAsLSWrDLDaW5
Owner
Author
|
No description provided. |
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.
Part of #5882 (CI speed).
Problem:
det_port.py runproved a shard's cases in name order (ThreadPoolExecutor.map). A long case could start last and hold the shard while the other workers sat idle. In run 39696713590,carddemo-dailyval(276 s),carddemo-posttran(223 s) andcarddemo-intcalc(196 s) each set their shard's end.What it does:
det_port.proof_order()starts the cases longest first. It uses the recorded durations the shards are already balanced by (proof_sweep.load_durations/case_weights; an unmeasured case weighs the median). On CI the plan merges the newest measured durations into that same file.summary.jsonkeeps its order, and verdicts cannot change: only the start order does.Expected (simulated on the current plan with
det_sweep_durations.json, 4 workers a shard):Most shards then sit at their lower bound, max(work / 4, longest case).
Checked:
ab_compare.pySAME on verdicts, outputs, coverage and files.🤖 Generated with Claude Code