Report each claw's effective context window - #2
Open
teddytennant wants to merge 1 commit into
Open
Conversation
The harness holds the prompt, the patch collection and the isolation constant across claws, but not the context budget, and nothing recorded what each claw actually ran with. Reading the shipped example configs: hermes pins 200000 for openrouter, zeroclaw pins 128000, nanobot sets nothing and falls back to its own default. Add claw_swebench/context_window.py, which reads the budget out of each claw's live config under that claw's own key: context_length for hermes, max_context_tokens for zeroclaw, contextWindowTokens for nanobot and openclaw. Reading it rather than asserting it here means the record reflects what the claw ran with, and a broken config reports instead of raising. run_infer.py logs the budget at startup and warns when it is unset. Every instance's metadata.json gains a claw_config block carrying claw, model, timeout, max_turns and the context window with the file and key it came from. python3 -m claw_swebench.context_window prints the spread across claws. No claw's behaviour changes and no published number moves. The nanobot example still ships without contextWindowTokens; its _comment now says so and names the key, since normalising the budget is a call about the benchmark rather than about the plumbing.
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.
Toward #1.
Running the shipped example configs through a reader shows the spread the issue is asking about:
So hermes runs at 200k, zeroclaw at 128k, and nanobot at whatever NanoBot defaults to. The README lists same prompt, no network answers, future-commit stripping and per-instance isolation as properties enforced for every claw, and context budget is not on that list even though it moves the result.
claw_swebench/context_window.pyreads the budget out of each claw's live config under that claw's own key:custom_providers[<model.provider>].context_lengthfor hermes,agent.max_context_tokensfor zeroclaw,agents.defaults.contextWindowTokensfor nanobot and openclaw. It reads rather than asserts, so the record is what the claw actually ran with instead of what the harness believes. A missing or malformed config reports a note and returns None; it never raises into a run.Three places consume it.
run_infer.pylogs the budget at startup and warns when it is unset. Each instance'smetadata.jsongains aclaw_configblock with claw, model, timeout, max_turns and the context window plus the file and key it came from, so an old artifact directory can be audited later.python3 -m claw_swebench.context_windowprints the table above.I did not normalize anything. No claw's behaviour changes and no published number moves. The nanobot example still ships without
contextWindowTokens; its_commentnow names the key and says the budget is unset, because picking a number for it changes nanobot's score and that is a call about the benchmark, not about the plumbing. If you want the normalized version, say which budget and I will add the flag that writes it into each claw's config.What I ran:
python3 -m unittest discover -s tests, 17 tests covering the readers, the failure modes and the shipped examples.run_infer.py --claw {nanobot,hermes,zeroclaw} --dataset verifiedfar enough to see the startup line for each, which is where the numbers above came from. I did not run inference or evaluation, so there is no before/after on any score here.The thing this does not do is tell you what the reported nanobot run used, since that lived in a local
config.jsonthat is gitignored. That one is still yours to answer, and adding the per-claw configs behind the leaderboard runs would close the rest of #1.