Remove double setting of default values in function signatures#399
Merged
juanmichelini merged 1 commit intomainfrom Feb 13, 2026
Merged
Remove double setting of default values in function signatures#399juanmichelini merged 1 commit intomainfrom
juanmichelini merged 1 commit intomainfrom
Conversation
Remove EVAL_DEFAULTS from function signatures in: - swebench/eval_infer.py: run_swebench_evaluation() - swtbench/eval_infer.py: try_pull_prebaked_images() Default values should be read at args setting via parser.set_defaults(), not in function call signatures. This follows the pattern used by other benchmarks in the repository. Fixes #398 Co-authored-by: openhands <openhands@all-hands.dev>
simonrosenberg
approved these changes
Feb 13, 2026
Collaborator
|
@OpenHands are there any other default values that, similarly to this PR, are set twice in the benchmarks repo? If so, make another PR from main and remove them |
|
I'm on it! simonrosenberg can track my progress at all-hands.dev |
|
Yes, I found one additional case of a default value being set twice in the benchmarks repo, similar to PR #399. Finding:
Action Taken:
Changes made:
All 35 tests pass with this change. |
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.
Summary
This PR removes the double setting of default values in function signatures. Default values should be read at args setting via
parser.set_defaults(), not in function call signatures.Fixes #398
Changes
benchmarks/swebench/eval_infer.pyEVAL_DEFAULTSfromrun_swebench_evaluation()function signature parametersbenchmarks/swtbench/eval_infer.pyEVAL_DEFAULTS["split"]fromtry_pull_prebaked_images()function signatureargs.splitConsistency with Other Benchmarks
This change aligns with the pattern used by other benchmarks in the repository:
swebenchmultimodal/eval_infer.py- uses onlyparser.set_defaults(**EVAL_DEFAULTS)gaia/run_infer.py- uses onlyparser.set_defaults(**INFER_DEFAULTS)commit0/run_infer.py- uses onlyparser.set_defaults(**INFER_DEFAULTS)swtbench/run_infer.py- uses onlyparser.set_defaults(**INFER_DEFAULTS)Testing Justification
No new tests are required for this change because:
Pure refactoring: This is a code cleanup that doesn't change behavior. The defaults are still applied via
parser.set_defaults(**EVAL_DEFAULTS)in themain()function.No external callers: The affected functions (
run_swebench_evaluationandtry_pull_prebaked_images) are only called from their respectivemain()functions, which always pass explicit arguments from the parsed args.Existing tests pass: All 32 existing tests pass, confirming the refactoring doesn't break any functionality.
Static type checking: The pre-commit hooks include Pyright type checking which validates that all required arguments are passed correctly.
@juanmichelini can click here to continue refining the PR