Remove double setting of timeout default in swebench eval_infer.py#417
Open
simonrosenberg wants to merge 1 commit intomainfrom
Open
Remove double setting of timeout default in swebench eval_infer.py#417simonrosenberg wants to merge 1 commit intomainfrom
simonrosenberg wants to merge 1 commit intomainfrom
Conversation
The timeout argument had its default set twice: 1. In the add_argument() call with default=EVAL_DEFAULTS['timeout'] 2. In parser.set_defaults(**EVAL_DEFAULTS) This removes the redundant default from add_argument() since set_defaults() already applies all EVAL_DEFAULTS including timeout. Co-authored-by: openhands <openhands@all-hands.dev>
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 the
timeoutdefault value inbenchmarks/swebench/eval_infer.py.Similar to PR #399, this fixes a case where a default value was being set twice:
add_argument()call withdefault=EVAL_DEFAULTS["timeout"]parser.set_defaults(**EVAL_DEFAULTS)Changes
benchmarks/swebench/eval_infer.pydefault=EVAL_DEFAULTS["timeout"]from the--timeoutargument definitiontimeoutis now included in the defaults applied byset_defaults()Consistency with Other Benchmarks
This change aligns with the pattern used by other benchmarks in the repository where defaults are only set via
parser.set_defaults():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
All 35 existing tests pass, confirming the refactoring doesn't break any functionality.
@simonrosenberg can click here to continue refining the PR