feat: add a subsampled swe-bench-pro variant (33/66/66) for optimizer runs - #62
Open
shehabyasser-scale wants to merge 1 commit into
Open
feat: add a subsampled swe-bench-pro variant (33/66/66) for optimizer runs#62shehabyasser-scale wants to merge 1 commit into
shehabyasser-scale wants to merge 1 commit into
Conversation
shehabyasser-scale
force-pushed
the
feat/swe-bench-pro-subsample
branch
2 times, most recently
from
July 28, 2026 05:09
7ce8a89 to
00cb4fc
Compare
… runs Additive only. The canonical baseline/build.yaml and its 146/292/293 split are byte-unchanged; this adds a second config beside them. Why: the full split is unaffordable for an optimizer loop. Each case builds a real repository and runs its test suite, so the full-split held-out baseline alone cost ~7.8h of wall clock for three rounds, and an optimizer evaluates candidates many times over. 33/66/66 matches gaia and browsecomp-plus, the suite's tightest split, which is the right reference for its most expensive benchmark. The sample is NESTED, which is the load-bearing detail. `--sample` computes the canonical split first, unchanged, then narrows each partition within itself, so partitions/sample/test.json is a strict subset of partitions/test.json. Two things follow. No instance can migrate from test into development: a flat re-split at the smaller size does move them, and the first version of this change produced a "held-out" set with zero overlap with the real one, silently drawn from what had been dev and validation. And the baseline needed no re-measuring. baseline_reward: 0.2923 over the 66 sampled cases, recomputed from the very same K=3 trials that produced the canonical 0.2940 +-0.0082. The recomputation reproduces 0.2940 +-0.0082 exactly on the full set first, which is what validates it. The point estimate barely moves; the spread widens to +-0.0332 because n falls 293 -> 66. CAVEAT recorded in the file: those trials targeted qwen-3.6-27b while the variant targets deepseek-v4-flash, so 0.2923 is provisional until a K=3 deepseek pass over the 66 replaces it (~1.8h at max_concurrency 24). Repository stratification and sha256 ordering are unchanged and apply within each partition, so all 11 upstream repos appear in every sampled partition. The sample shares the canonical manifest rather than duplicating it: it pins the same 731 refs and the build loader reads only names from it, so a second copy would just be a second thing to keep in sync. `--tasks-dir` is now optional, since the manifest already records every name and stratum. The variant also carries the settings the canonical config is missing relative to its siblings: deepseek-v4-flash (prefixed-only, because agents strip just `openai/` before the gateway matches exactly), max_concurrency 24, 4x case budgets (132/264), case_timeout equal to task_agent_timeout at 3000 so the multiplier is 1.0, score_baseline false with the baseline pinned, and n_attempts 3 / mean on the test target. CONFIGURATION.md gains the swe-bench-pro column it never had, describing the canonical config, plus a footnote covering the variant and two pre-existing inconsistencies in the canonical file that are deliberately left alone here: case_timeout_seconds 1800 implies a 0.6 multiplier though the pinned 0.294 was measured at 1.0 (all 879 sampled trial configs say so), and model: gpt-4o though that baseline was measured against qwen-3.6-27b. Verified: canonical partitions, manifest and build.yaml show no diff against pr3; canonical --check passes; --sample regenerates byte-identically; every sampled partition is a strict subset of its canonical counterpart; both configs compile side by side (full -> 146/292/293, gpt-4o, 1800; sample -> 33/66/66, deepseek, 3000, baseline 0.2923, budgets 132/264, n_attempts 3/mean on test only); 13 passed, 6 skipped in test_v05_benchmark_configs.py.
shehabyasser-scale
force-pushed
the
feat/swe-bench-pro-subsample
branch
from
July 28, 2026 14:41
00cb4fc to
72bb132
Compare
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.
Making swe-bench-pro affordable for an optimizer loop, and keep using deepseek.
This is additive. The canonical
baseline/build.yamland its 146/292/293 split are byte-unchanged. This adds a second config beside them, so both can be run.Why a variant
Each case builds a real repository and runs its test suite. The full-split held-out baseline alone cost ~7.8h of wall clock for three rounds, and an optimizer evaluates candidates many times over. 33/66/66 matches gaia and browsecomp-plus, the suite's tightest split.
The sample is nested
--samplecomputes the canonical split first, unchanged, then narrows each partition within itself, sopartitions/sample/test.jsonis a strict subset ofpartitions/test.json.This is the load-bearing detail, and I got it wrong first. A flat re-split at the smaller size moves instances between partitions: my initial version produced a "held-out" test set with zero overlap with the real one, silently drawn from what had been dev and validation. Nesting prevents that, and buys a second thing: the baseline needed no re-measuring.
baseline_reward: 0.2923is the same K=3 trials recomputed over the 66 sampled cases. The recomputation reproduces0.2940 ±0.0082exactly on the full set first, which is what validates it. The point estimate barely moves; the spread widens fourfold because n falls 293 → 66, which matters when reading a candidate's margin over that floor.Caveat, recorded in the file: those trials targeted qwen-3.6-27b, while the variant targets deepseek-v4-flash. So 0.2923 is provisional until a K=3 deepseek pass over the 66 replaces it. That costs ~1.8h at
max_concurrency: 24(calibrated from the real 879-trial run: 131.3h serial, 24 effective slots, ideal 5.47h vs actual 7.8h = 1.43x overhead).What the variant carries that the canonical config lacks
All places where swe-bench-pro is the lone holdout in the suite: deepseek-v4-flash (prefixed-only, since agents strip just
openai/before the gateway matches exactly),max_concurrency: 24, 4x case budgets (132/264),case_timeout == task_agent_timeoutat 3000 so the multiplier is 1.0,score_baseline: falsewith the baseline pinned, andn_attempts: 3/meanon the test target.Two pre-existing inconsistencies, deliberately left alone
Both are in the canonical
build.yaml. I did not change them, since this PR is meant to be additive, but they are worth separate one-line fixes:case_timeout_seconds: 1800againsttask_agent_timeout_seconds: 3000implies a 0.6 multiplier, but the pinned 0.294 was measured at 1.0: all 879 sampled trial configs recordagent_timeout_multiplier=1.0. The config value is wrong, not the measurement.model: gpt-4o, but the 0.294 baseline was measured against qwen-3.6-27b.Also, swe-bench-pro is the only benchmark still using
score_baseline: true, so it re-measures the seed on every run rather than pinning it.Verification
build.yamlshow no diff against pr3--checkpasses;--sampleregenerates byte-identicallybaseline_reward0.2923, budgets 132/264,n_attempts: 3/meanon the test backend onlypytest tests/test_v05_benchmark_configs.py: 13 passed, 6 skippedNot yet verified: no trial has been executed against the sampled split. An end-to-end optimizer run on it is in flight and I will report the result here. Everything above is config-level correctness.
Note for the optimizer-model axis
The preflight from #59 caught something that affects more than this PR:
gpt-5.3-codexhas no/responsesdeployment on the LiteLLM proxy (/chat/completions→ 200,/responses→ 404DeploymentNotFound). Thecodexagent is Responses-native, so any optimizer run using it as the optimizer model fails after setup.gpt-5.6-solandgpt-4.1serve both routes; the variant's producer default is nowgpt-5.6-sol.Rebased onto the re-pinned base (2026-07-28)
pr3-harness-benchabsorbedpr2-add-vero(mergeed55bc7) and re-pinned all five held-out baselines (44a852e), which collided with this branch inCONFIGURATION.md. Rebased as one commit oned55bc7; both sides of each hunk are kept:swe-bench-procolumn appended to every row. Verified all 19 rows have identical cell counts.◈footnote, so◈still sits next to◇.Added a third documented inconsistency. swe-bench-pro is the one benchmark the re-pin did not cover, and its staleness is the strongest case of exactly what upstream's new note describes: the pinned 0.294 was measured on a different agent than the one in the tree. The qwen-era agent used Chat Completions with an explicit local
messageslist and edited files on 571 of 879 cases; the committed seed is Responses-only, delegates its conversation toprevious_response_id, and over 66 sampled cases called write_file/apply_patch/submit zero times for 0.0000. Documented rather than silently repaired, with a pointer toscripts/rescore_candidate.py --seed.pytest tests/test_v05_benchmark_configs.py: 13 passed, 6 skipped.Greptile Summary
This PR adds a subsampled (33/66/66) swe-bench-pro variant for optimizer runs alongside the unchanged canonical 146/292/293 config. The approach is additive —
baseline/build.yamland its partition files are byte-identical topr3-harness-bench.build.sample.yaml): targetsfireworks_ai/deepseek-v4-flash, bumpsmax_concurrencyfrom 8 → 24, alignscase_timeout_secondswithtask_agent_timeout_secondsat 3000 (fixing the 0.6-multiplier inconsistency in the canonical config), pinsscore_baseline: false, and carries abaseline_reward: 0.2923measured from the same K=3 qwen trials — provisional until a deepseek pass replaces it._subsampleinpartition_swe_bench_pro.py): stratified sampling strictly inside each canonical partition so no instance can migrate between partitions; the largest-remainder loop is mathematically guaranteed to terminate._tasks_from_manifestlets--samplerun without re-exporting 731 task directories.baseline_reward: 0.2923was measured against qwen-3.6-27b, not the variant's deepseek target; the file notes it's provisional until a ~1.8h K=3 deepseek run replaces it.Confidence Score: 5/5
Safe to merge — all changes are additive; the canonical config and its partition files are untouched.
The canonical build.yaml and its 146/292/293 partitions are byte-unchanged. The new YAML, partition files, and script additions are self-consistent: partition counts match SAMPLE_COUNTS, the nested-sampling algorithm is correct, and the known baseline-model mismatch is prominently documented. The only defect found is a stray Markdown separator cell in the documentation table.
Files Needing Attention: The extra separator cell in CONFIGURATION.md is cosmetic. No functional files require special attention.
Important Files Changed
Flowchart
%%{init: {'theme': 'neutral'}}%% flowchart TD A[partition_swe_bench_pro.py] --> B{--sample flag?} B -- No --> C[_read_tasks / _tasks_from_manifest] C --> D[_allocate: 146/292/293 stratified split] D --> E[_render: full manifest + partition files] E --> F[partitions/manifest.json] F --> G[build.yaml 146/292/293 gpt-4o concurrency 8] B -- Yes --> H[_tasks_from_manifest reads existing manifest] H --> I[_allocate: same 146/292/293 full split] I --> J[_subsample: nested LR sample 33/66/66 within each partition] J --> K[_render_sample: partition files only] K --> L[partitions/sample/ development/validation/test.json] L --> M[build.sample.yaml 33/66/66 deepseek-v4-flash concurrency 24]Reviews (4): Last reviewed commit: "feat: add a subsampled swe-bench-pro var..." | Re-trigger Greptile