Closed etwk closed 1 month ago
Ah thanks for the note, tagging @XenonMolecule
Hi @etwk,
Try dspy.experimental
- dspy.settings.configure(rm=colbertv2, lm=llm_compile, experimental=True)
.
This error happens as MIPRO is summarizing DSPy code and is dependent on certain module structure parsing to retrieve the right code. As certain new releases point towards the experimental setup (which will be comprehensively updated in future releases), I would advise checking if enabling experimental mode fixes this error.
Hi @etwk, Try
dspy.experimental
-dspy.settings.configure(rm=colbertv2, lm=llm_compile, experimental=True)
.This error happens as MIPRO is summarizing DSPy code and is dependent on certain module structure parsing to retrieve the right code. As certain new releases point towards the experimental setup (which will be comprehensively updated in future releases), I would advise checking if enabling experimental mode fixes this error.
Hi @arnavsinghvi11 , thanks for the insight. I have tried experimental=True
, same error.
Getting the same error here with GPT-4o. @etwk Have you found a workaround or a solution yet?
Getting the same error here with GPT-4o. @etwk Have you found a workaround or a solution yet?
Yes, please find it at the end of the first post.
Add one comment line has bypassed this issue for me:
# self.generate_query = dspy.ChainOfThought(GenerateSearchQuery) # IMPORTANT: solves error `list index out of range`
I also encountered the same error when using MIPRO V2. Is there any new progress?
Ill fix this today or tomorrow @okhat
I think this is now fixed
MIPROv2 with multiple hop module results in error
IndexError: list index out of range
.Using the latest version:
dspy-ai==2.4.13
Error details:
Script:
Tried both local model
google/gemma-2-9b-it
andgpt-4o-mini
from OpenAI, same error.I'm able to avoid the error by adding one line inside the module
ContextVerdict
: