-
Notifications
You must be signed in to change notification settings - Fork 135
Add specific BuildScoreProvider for diversity to avoid extra encoding… #503
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
Conversation
… and decoding of nodes
int numBaseVectors; | ||
@Param({"0", "16"}) | ||
@Param({"48"}) |
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.
"0" is the test permutation that uses FP vectors as baseline, I think you want to keep that on in the list of parameters.
While commenting the parameters in the code is a sin I'm also fully guilty of... :)
if you want to avoid forgetting to uncommenting them back can also use the command line to set them when wanting to make a change in the following way (from the README.md
):
-p <param>=<value> - Benchmark parameters
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.
Sure this was accidental commit
@@ -41,7 +42,7 @@ | |||
* Benchmark that compares the distance calculation of Product Quantized vectors vs full precision vectors. | |||
*/ | |||
@BenchmarkMode(Mode.AverageTime) | |||
@OutputTimeUnit(TimeUnit.MICROSECONDS) | |||
@OutputTimeUnit(TimeUnit.MILLISECONDS) |
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.
good change!
|
||
for (int q = 0; q < queryCount; q++) { | ||
for (int i = 0; i < vectorCount; i++) { | ||
final ScoreFunction sf = buildScoreProvider.diversityProviderFor(i).scoreFunction(); |
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 think this test is not the same as the original.
Query vectors are random and not a derivation of the original dataset. Might want to change that to be similar and re-test.
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 diversity provider is for querying the local graph relative to another point in the graph. So maybe I should just change the name of the benchmark?
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.
Oh I see, so I misunderstood in that case. It sounds like it's ok to just leave as is.
Approving, just remember to uncomment the test permutations :)
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.
Approving, just remember to uncomment test permutations before merging.
thanks for the change!
… and decoding of nodes
For a JMH just benchmarking the diversity calculation this is a huge win
Before:
For actual Graph Build using PQ diversity this is more like 25% boost
Before
After