Closed HolographicX closed 1 month ago
My soft guess was that it may be related to using langchain_chroma, so I switched to ChromadbRM
from dspy, but I get the exact same error on seed -2.
particularly:
.../venv/lib/python3.12/site-packages/dspy/teleprompt/random_search.py
elif seed == -2:
# labels only
teleprompter = LabeledFewShot(k=self.max_labeled_demos)
program2 = teleprompter.compile(student, trainset=trainset2, sample=labeled_sample)
assert type(passages) in [list, tuple]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError
type(passages)
is dict
in my case; passages2text()
can parse dictionaries.
hello may I ask you whether or how you solved the problem "[error ]Error for example in dev set"?
Whoops, I actually did not solve this. I closed it because I thought I did (with my PR), but obviously I was missing something as the PR added unintended functionality. I would love to receive help on this.
Hi all, I'm seeing this problem too. Any suggestions on potential fixes?
Seeing the same issue every time I use evaluate. Any suggestions on fixes?
Fixed I think, if you migrate to DSPy 2.5 https://github.com/stanfordnlp/dspy/blob/main/examples/migration.ipynb
I'm trying to compile a zeroshot chain using BootstrapFewShot and langchain. I've followed this and this, with the only difference being that I'm using my own retriever.
My retriever is defined like so:
Where I'm creating the collection from the hotpotqa dataset, which I'm using for my metric.
Anyway, when running optimizer.compile() I'm able to train the first sample successfully:
However, during the 2nd seed, it fails every time. Here are the full logs of the failure: