-
Notifications
You must be signed in to change notification settings - Fork 79
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
Add benchmark support for vector radial search #546
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.
Hi @junqiu-lei, a large portion of the diffs pertain to formatting changes unrelated to the changed/new functionality. Can you submit only the latter in this PR?
We want to be cautious about changing formatting guidelines. Suggestions are welcome, but they need to be discussed separately and applied globally. Thanks for understanding.
@gkamat Thanks the feedback, yes, I just updated PR. |
1b22e1f
to
f706f39
Compare
@junqiu-lei Overall looks good. Added minor comments. You might also need follow up PR once #581 is merged |
…ct#546 Signed-off-by: Finn Roblin <[email protected]>
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.
LGTM overall. Just added few minor comments.
6d244d9
to
398a893
Compare
if self.query_type == self.KNN_QUERY_TYPE: | ||
return Context.NEIGHBORS | ||
if self.query_type == self.MIN_SCORE_QUERY_TYPE: | ||
return Context.MIN_SCORE_NEIGHBORS | ||
if self.query_type == self.MAX_DISTANCE_QUERY_TYPE: | ||
return Context.MAX_DISTANCE_NEIGHBORS |
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.
Using elif
will be more appropriate.
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.
Ummm, I used to use elif
, @VijayanB and I agreed to updated to current condition check for cleaner read. It has validation step before this
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.
The effect is the same in this case, but using elif
makes it more readable, especially since the cases are mutually exclusive. I'll leave it to you.
query.update({ | ||
"k": self.k, | ||
}) |
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.
Instead of using query.update()
here:
query_update["k"] = self.k
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.
I'm following the same pattern used in this function.
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.
Again, this is for better readability, especially if there is only a single key being updated. I won't insist, though.
Signed-off-by: Junqiu Lei <[email protected]>
Signed-off-by: Junqiu Lei <[email protected]>
Signed-off-by: Junqiu Lei <[email protected]>
…oject#546)" This reverts commit 1eb5171.
Description
Since OpenSearch version 2.14, we've introduced vector radial search in k-NN plugin, this PR will support run benchmark with radial search api.
Raised another PR opensearch-project/opensearch-benchmark-workloads#309 in opensearch-benchmark-workloads to have the change accordinately.
Testing
Example local run workloads and results:
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.