Closed NumberChiffre closed 1 week ago
Closing this issue after getting rid of Error getting source code: unhashable type: 'list'.
by converting the extraction dspy.Module
from using ChainOfThought
to TypedChainOfThought
with Pydantic models for input and output fields.
Description
Hey guys,
I created an extractor using CoT to extract entities and relationships out of text, and tried to run it with MIPROv2 to generate optimized prompt instructions. So far, I am not able to get far. I am also using the recommended
dspy.settings.configure(experimental=True)
because the program keeps asking me aboutformat_handler
so I had to switch to using theexperimental
feature, hence getting stuck with this new problem. Note, this error happens forv2.4.14
andv2.4.16
so far.The following logs show that I am able to process the 4 training examples without problems, before hitting a problem after bootstrapping with
AssertionError: No input variables found in the example
:Code:
Full code in jupyter notebook and logs: https://github.com/gusye1234/nano-graphrag/blob/be09b227e018ee56faa5b3d0e4f74d0ba7d04f63/examples/finetune_entity_relationship_dspy.ipynb
Logs