Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Meta knn few shot #1894

Draft
wants to merge 8 commits into
base: main
Choose a base branch
from
Prev Previous commit
Next Next commit
Update .gitignore to exclude virtual environments and additional file…
…s. Remove unused imports in KNN class.
  • Loading branch information
ammirsm committed Dec 17, 2024
commit 09dc3b73d84e99b85a92d4dc7cb04c877891dc2e
1 change: 0 additions & 1 deletion dspy/predict/knn.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ def __init__(self, k: int, trainset: list, vectorizer):
trainset: List of training examples to search through
vectorizer: Optional dspy.Embedder for computing embeddings. If None, uses default Embedder
"""
import dspy

self.k = k
self.trainset = trainset
Expand Down
2 changes: 0 additions & 2 deletions dspy/teleprompt/meta_knn_fewshot.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
import random
from typing import List
import pandas as pd
import warnings
from tqdm import tqdm
import dspy
from dspy.predict.knn import KNN
from dspy.teleprompt import BootstrapFewShot
from .teleprompt import Teleprompter
Expand Down
Loading