Adding example for tuning build and search params using Optuna#257
Conversation
|
/ok to test |
|
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
| @@ -0,0 +1,2266 @@ | |||
| { | |||
There was a problem hiding this comment.
The challenge with vector search is that there's a dual objective here- it's not just about the final recall achieved but rather the tradeoff between a "good enough" recall with "good enough" search latency / throughput. The problem with only using recall is that you will usually find the search latency is at its highest. I think we have to consider both in here up front, otherwise this example isn't particularly useful in the practice. Maybe we can accept a target recall try to minimize search latency that reaches at least to the target recall.
Reply via ReviewNB
| @@ -0,0 +1,2266 @@ | |||
| { | |||
There was a problem hiding this comment.
Line #12. n_lists = trial.suggest_int("n_lists", math.sqrt(dataset_size)*0.5, math.sqrt(dataset_size)*1.5)
This looks great, but I think we should provide a wider range of values to try so that we can see the objective in action and hit our target recall/latency.
Reply via ReviewNB
|
@dpadmanabhan03 I think this example looks great. I think we should expand it to cover ivf-flat, ivf-pq, and cagra and add the dual objectives in there to accept the target recall. We should also try to prefer the lowest build times by using the inverse of the build time in the score for the objective. |
9ab30a6 to
a5b99ed
Compare
a5b99ed to
3ae5242
Compare
|
Hi @dpadmanabhan03. The notebook is looking great. Can you also copy/add a notebook that has a couple cpu comparisons in there? (You can use FAISS as the CPU library since it has graphbased HNSW and the ivf methods) |
|
/ok to test |
|
/ok to test |
|
/merge |
No description provided.