-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
3 bugs in one testcase: Hang, broken Retry on v2.4.9 and some other bonus bug on main #1080
Comments
Thank you @tarasglek ! This is indeed composing quite a few things, and I want to understand if the issue is just in the assertions in particular. So we can narrow this down, I suspect everything else is OK? |
How can I help you narrow these down. There are definitely 2 clear bugs.
I've refactored code to use multiple processes to get around this and am able to use v2.4.9 with assertions and to use DSPy signatures/suggestions as written so long as they run in separate proceses |
Hi @tarasglek , there was a recent PR pushed to main for assertions. Can you check if this error is resolved with the latest changes? |
if i run above code without change with current dspy git: python suggestion_bug.py It fails:
|
Hello, I am currently on dspy-ai 2.4.10
|
Inspired by "using ai for your metric" and nested dspy pipelines, I found a few bugs that are blocking me
2.4.9 and main both hang. due to lock in
dspy/dspy/primitives/assertions.py
Line 189 in 78d95df
When I try to use a nested DSPy module with
num_detector = CoT_NumberDetector().activate_assertions()
Once i get rid of 2.4.9 .activate_assertions() on NumberDetector, the Suggestions get ignored during retries(eg we do 3 identical llm calls, and hit the cache). Cause is
dspy/dspy/predict/retry.py
Line 59 in 78d95df
if dspy.settings.backtrack_to == self:
toif dspy.settings.backtrack_to is not None
makes Suggestion()s get incorporated into retries.With
num_detector = CoT_NumberDetector()
below, on main I getMinimal testcase
Sorry this isn't more minimal. Not sure why github wont let me file it as attachment.
This is a contrived example where I do a second llm call to produce Suggestion()s to result of first llm call. This is the most faithful example I could come with from docs for using one DSPy pipeline to test another
On 2.4.9 with
is not None
change I'm able to get the following output:The text was updated successfully, but these errors were encountered: