Skip to content

fix: skip unresolved-task sampling when the parent has none - #37

Open
liuzhengyang699 wants to merge 1 commit into
jennyzzt:mainfrom
liuzhengyang699:fix/empty-unresolved-parent
Open

liuzhengyang699 wants to merge 1 commit into
jennyzzt:mainfrom
liuzhengyang699:fix/empty-unresolved-parent

Conversation

@liuzhengyang699

Copy link
Copy Markdown

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 == 0 check compares a list with an integer and never skips it. random.choice([]) then aborts the generation with IndexError.

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 --check passed.

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.

1 participant