fix: mark discarded-no-reasoning prompts as completed to prevent infinite retry (#9950)#9968
Closed
Magicray1217 wants to merge 1 commit into
Closed
Conversation
…nite retry (NousResearch#9950) Prompts explicitly discarded for having no reasoning were not added to completed_in_batch, causing --resume to retry them indefinitely. Add the prompt index to completed_in_batch before continuing, since discard is a terminal disposition (not a failure that should be retried).
Contributor
|
Closed in favor of PR #12997 #12997 which fixes the same issue with identical logic plus a regression test. Thanks @Magicray1217! |
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
Fixes #9950. Prompts discarded for having no reasoning (
has_any_reasoning == False) were not added tocompleted_in_batch, causing--resumeto retry them indefinitely.Root Cause
In
_process_batch_worker(), when a prompt is discarded (line 444-447), the code incrementsdiscarded_no_reasoningandcontinues — skipping thecompleted_in_batch.append()that happens later. On resume, these prompts appear unfinished and get re-processed forever.Fix
Add
completed_in_batch.append(prompt_index)before thecontinuein the discard branch. Discard is a terminal disposition, not a retryable failure.1 file changed, 1 insertion.