Skip to content

Update cagra config yaml for cuvs_bench#1822

Open
tfeher wants to merge 3 commits into
mainfrom
cuvs_bench_cagra_config
Open

Update cagra config yaml for cuvs_bench#1822
tfeher wants to merge 3 commits into
mainfrom
cuvs_bench_cagra_config

Conversation

@tfeher

@tfeher tfeher commented Feb 19, 2026

Copy link
Copy Markdown
Contributor

This PR updates the CAGRA config options for the parameter sweep used by cuvs-bench.

  • intermediate_graph_degree: in practice we often use intermediate_graph_degree = graph_degree * 1.5. We pick a fixed value that works works with all of the graph_degree options we want to test.
  • max_iterations: the default 0 value auto selects the iterations based on itopk. I have added value 16 additionally, which is a low number of iterations, and it can be useful to reach large throughput in recall < 0.9 region.
  • search_width: we often reach around 99% recall with width 8, therefore I propose to remove higher values from the base scan
  • graph_build_algo: ideally we wound want the algorithm automatically selected. Currently the benchmark framework would select the iterative method by default, which does not work with memory mapped data. The NN descent method can run out of memory for 10M scale dataset. Therefore I propose to fix IVF_PQ, until we enable a reliable default algorithm selection.

@copy-pr-bot

copy-pr-bot Bot commented Feb 19, 2026

Copy link
Copy Markdown

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.

@cjnolet cjnolet added improvement Improves an existing functionality non-breaking Introduces a non-breaking change labels Feb 19, 2026
@cjnolet cjnolet moved this to In Progress in Unstructured Data Processing Feb 19, 2026

@tarang-jain tarang-jain left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM except one comment.

intermediate_graph_degree: [32, 64, 96, 128]
graph_build_algo: ["NN_DESCENT"]
graph_degree: [32, 64, 96]
intermediate_graph_degree: [128]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Dont we want intermediate_graph_degree 64 when the graph degree is 32? @bkarsin had also raised an issue in the past wherein CAGRA can give poor recall when the intermediate graph degree is quite large in comparison to the graph degree.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Ideally yes, intermediate_graph_degree = 2 * graph_degree would be sufficient. Our benchmark framework does not adjust this automatically. I would not expect recall drop by using larger intermediate degree. Do we have any detail on that that issue?

@cjnolet

cjnolet commented May 13, 2026

Copy link
Copy Markdown
Contributor

/ok to test e06e1ee

@coderabbitai

coderabbitai Bot commented May 13, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: f163978a-d849-434b-aeb2-6fed9dca3bb1

📥 Commits

Reviewing files that changed from the base of the PR and between 63ed6ec and e06e1ee.

📒 Files selected for processing (2)
  • python/cuvs_bench/cuvs_bench/config/algos/cuvs_cagra.yaml
  • python/cuvs_bench/cuvs_bench/config/algos/cuvs_mg_cagra.yaml

📝 Walkthrough

Summary by CodeRabbit

  • Chores
    • Updated CAGRA benchmark configurations with optimized hyperparameter ranges for both single-GPU and multi-GPU variants.
    • Modified build algorithm selection and refined search width parameters to improve benchmark efficiency.

Walkthrough

This PR updates hyperparameter sweep configurations for CAGRA and multi-GPU CAGRA (MG_CAGRA) benchmark algorithms. The primary changes include switching the graph build algorithm from NN_DESCENT to IVF_PQ, narrowing the range of graph degree parameters, and reducing the search width sweep space in baseline configurations.

Changes

Benchmark CAGRA configuration parameter updates

Layer / File(s) Summary
CAGRA base and test parameter grid updates
python/cuvs_bench/cuvs_bench/config/algos/cuvs_cagra.yaml
graph_build_algo switches from NN_DESCENT to IVF_PQ; graph_degree narrows to [32, 64, 96]; intermediate_graph_degree becomes [128]; search_width range is reduced in base configuration.
MG_CAGRA base and test parameter grid updates
python/cuvs_bench/cuvs_bench/config/algos/cuvs_mg_cagra.yaml
Base configuration changes graph_build_algo to IVF_PQ, narrows degree parameters, reduces search_width to [1, 2, 4, 8], and adds max_iterations with [0, 16]. Test configuration switches graph_build_algo to IVF_PQ with fixed degree values unchanged.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely summarizes the main change: updating CAGRA configuration YAML files for the cuvs_bench benchmarking tool.
Description check ✅ Passed The description is directly related to the changeset, providing detailed rationale for each configuration parameter change (intermediate_graph_degree, max_iterations, search_width, graph_build_algo) in the CAGRA YAML files.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch cuvs_bench_cagra_config

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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: In Progress

Development

Successfully merging this pull request may close these issues.

4 participants