-
Notifications
You must be signed in to change notification settings - Fork 3
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
Adding embeddings results #47
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
did a quick review. will check details again later
repoqa/provider/embeddings/openai.py
Outdated
from typing import List, Tuple | ||
|
||
from openai import Client | ||
from sklearn.metrics.pairwise import cosine_similarity |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sklearn is a bit huge. ideally we want some lighter dependencies (avoiding the risk of dep conflicts in the future) or just impl the function ourselves.
repoqa/search_needle_function.py
Outdated
@@ -374,6 +385,8 @@ def evaluate_model( | |||
eval_ignore_comments: bool = False, # ignore comments during score computation | |||
trust_remote_code: bool = False, | |||
attn_implementation=None, | |||
is_embedding: bool = False, | |||
embedding_context_chunk_size: int = 30 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this # of chunks or # tokens for each chunk? better make it more explicit :)
also i think specifying the size /#token of each chunk might be more intuitive
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Currently it's lines of code per chunk, will change the variable name
…arn for cosine similarity
No description provided.