stanfordnlp/dspy

Miprov2 doesn't work with TypedPredictors

Closed this issue · 3 comments

pattern = r"^(.*dspy\.(ChainOfThought|Predict).*)$" # TODO: make it so that this extends out to any dspy Module

As the TODO line suggests it doesn't work with typed predictors.

a quick fix for me was to change

pattern = r"^(.*dspy\.(ChainOfThought|Predict).*)$"  # TODO: make it so that this extends out to any dspy Module

to

pattern = r"^(.*dspy\.(ChainOfThought|Predict|TypedPredictor).*)$"  # TODO: make it so that this extends out to any dspy Module

good to get this on the radar of @XenonMolecule

Proposed a trivial fix for this suggested change in #1453

Thanks for your time and effort, people :)

Thanks @haznai this looks great! I think this should work for ReAct and ProgramOfThought too