dspy icon indicating copy to clipboard operation
dspy copied to clipboard

Can't save Compiled KNNFewShot Examples

Open Zoher15 opened this issue 8 months ago • 3 comments

Hi,

I tried the following but just got an empty json:

knn_fewshot = KNNFewShot(KNN, k=8, trainset=train)
compiled_knn_fewshot = knn_fewshot.compile(Hotpot, trainset=train)
compiled_knn_fewshot.save(f"Hotpot-knn-demos.json")

This would help in not having to repeat the knn search everytime?

Zoher15 avatar May 31 '24 23:05 Zoher15