Skip to content

Fix SWE-Lancer token usage totals - #148

Open
sylvesterkaczmarek wants to merge 3 commits into
openai:mainfrom
sylvesterkaczmarek:fix/swelancer-token-totals
Open

Fix SWE-Lancer token usage totals#148
sylvesterkaczmarek wants to merge 3 commits into
openai:mainfrom
sylvesterkaczmarek:fix/swelancer-token-totals

Conversation

@sylvesterkaczmarek

Copy link
Copy Markdown

Summary

Remove the phantom one-token offset from SWE-Lancer aggregate usage metrics.

SWELancerEval.get_full_summary() currently initializes each aggregate token counter to 1 before adding the per-result grader usage. Every run therefore reports one extra input, output, and reasoning token, including an empty run.

Fixes #139.

Fix

Initialize total_input_tokens, total_output_tokens, and total_reasoning_tokens to zero before accumulation.

Regression coverage

Adds a focused empty-summary regression verifying all three aggregate token totals are exactly zero when no results are present.

Per-result token extraction, results.csv contents, earned-value aggregation, and grading behavior are unchanged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SWE-Lancer token totals include one phantom token per category

1 participant