-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(enh) StuckDetector: fix+enhance syntax error loop detection #3628
Merged
Merged
Changes from 1 commit
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
cf1307a
fix StuckDetector and add more errors for detection
tobitege acccc7a
Merge branch 'main' into enh-stuck-detection
tobitege 9a1d8fd
more stringent error detection and more unit tests
tobitege 14c6443
Merge branch 'main' into enh-stuck-detection
tobitege File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
more stringent error detection and more unit tests
- Loading branch information
commit 9a1d8fd32bac9d3bf404e86d14a9c2f464cf98e2
There are no files selected for viewing
This file contains 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
This file contains 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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤔
FWIW, I wonder if requiring the error message to be identical isn't too restrictive now, hah (I'll see myself out lol). Please correct me if I'm not seeing right (looking at the diff), around line 190 in stuck.py it looks like the error too has to be entirely the same. It's an interesting question. Because I recall the stuck llm tries to make minor variations when it sees a syntax error, like it might try to run stuff starting with quotes or backquotes. It's still a syntax error, but it can be on another word or another line.
(FWIW I tend to think that this test was succeeding because the "syntax error" string had to be near the end of the line or something like that, not requiring an identical line number. I could be wrong though.)
Maybe that's all okay, since we're reducing from 4 to 3. 🤔 Three but identical might work well enough. The llm did seem to have a favorite thing to try lol, while variations of the code to run (e.g. when it tried running with quotes) were more rare than the main thing it wanted. If this works in the scenario you found, we can go with it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The error doesn't have to be exactly the same, but the first line in those errors is like this:
Cell In[1], line 42
So similar to the other syntax error, where a change of the line number "breaks" the loop, I added the first line to be the same in 3 observations. The first line does not contain the actual error, but the location.
Then it is up to the bottom 3 lines to match, basically (error type and 2 lines of our prompt).
I'll try to re-run a couple of instances from the Aider bench, from where I had that error collection from originally. :)