Skip to content

Adding example for tuning build and search params using Optuna#257

Merged
rapids-bot[bot] merged 4 commits intorapidsai:branch-24.10from
dpadmanabhan03:branch-24.08
Oct 2, 2024
Merged

Adding example for tuning build and search params using Optuna#257
rapids-bot[bot] merged 4 commits intorapidsai:branch-24.10from
dpadmanabhan03:branch-24.08

Conversation

@dpadmanabhan03
Copy link
Copy Markdown
Contributor

No description provided.

@copy-pr-bot
Copy link
Copy Markdown

copy-pr-bot Bot commented Jul 29, 2024

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@dpadmanabhan03 dpadmanabhan03 marked this pull request as ready for review July 29, 2024 16:49
@cjnolet cjnolet added improvement Improves an existing functionality non-breaking Introduces a non-breaking change labels Jul 29, 2024
@cjnolet
Copy link
Copy Markdown
Member

cjnolet commented Jul 29, 2024

/ok to test

@review-notebook-app
Copy link
Copy Markdown

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

Comment thread notebooks/ivf_flat_hpo_example.ipynb Outdated
@@ -0,0 +1,2266 @@
{
Copy link
Copy Markdown
Member

@cjnolet cjnolet Aug 12, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Comment thread notebooks/ivf_flat_hpo_example.ipynb Outdated
@@ -0,0 +1,2266 @@
{
Copy link
Copy Markdown
Member

@cjnolet cjnolet Aug 12, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@cjnolet
Copy link
Copy Markdown
Member

cjnolet commented Aug 12, 2024

@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.

@dpadmanabhan03 dpadmanabhan03 force-pushed the branch-24.08 branch 2 times, most recently from 9ab30a6 to a5b99ed Compare August 19, 2024 17:58
@cjnolet
Copy link
Copy Markdown
Member

cjnolet commented Aug 29, 2024

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)

@cjnolet cjnolet changed the base branch from branch-24.08 to branch-24.10 August 29, 2024 19:38
@cjnolet
Copy link
Copy Markdown
Member

cjnolet commented Aug 29, 2024

/ok to test

@cjnolet
Copy link
Copy Markdown
Member

cjnolet commented Sep 27, 2024

/ok to test

@cjnolet cjnolet changed the title Adding example for tuning build and search params for ivf_flat using Optuna Adding example for tuning build and search params using Optuna Oct 2, 2024
@cjnolet
Copy link
Copy Markdown
Member

cjnolet commented Oct 2, 2024

/merge

@rapids-bot rapids-bot Bot merged commit 8a3fac3 into rapidsai:branch-24.10 Oct 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

improvement Improves an existing functionality non-breaking Introduces a non-breaking change

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants