Repository navigation
fix: skip unresolved-task sampling when the parent has none - #37
Open
liuzhengyang699 wants to merge 1 commit into
Open
liuzhengyang699 wants to merge 1 commit into
liuzhengyang699 wants to merge 1 commit into
Conversation
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.
A SWE-bench parent can have no unresolved tasks after solving them all, or have only empty patches left. If task selection reaches the unresolved-task branch, the current
unresolved_ids == 0check compares a list with an integer and never skips it.random.choice([])then aborts the generation withIndexError.Check whether the list is empty before sampling. The earlier empty-patch/stochasticity/context-length improvement branches and the Polyglot resolved-task fallback remain unchanged.
Validation:
python -m pytest tests/test_parent_task_selection.py -q— 4 passed. Both empty-unresolved cases fail before the change; nonempty SWE-bench selection and the Polyglot fallback still pass. Tests import the real outer loop using the README's pinned SWE-bench revision and mock diagnostic log lookup; no Docker containers or model calls.git diff --checkpassed.