Skip to content

Revert cagra-hnswlib wrapper refactoring to allow overriding heuristics#2287

Open
achirkin wants to merge 1 commit into
NVIDIA:mainfrom
achirkin:fix-bench-revert-cagra-overrides-hnsw-params
Open

Revert cagra-hnswlib wrapper refactoring to allow overriding heuristics#2287
achirkin wants to merge 1 commit into
NVIDIA:mainfrom
achirkin:fix-bench-revert-cagra-overrides-hnsw-params

Conversation

@achirkin

@achirkin achirkin commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Bring back the ability to override CAGRA build parameters via index config for CAGRA-HNSW wrapper.

PR #1719 attempted to simplify the wrapper logic by using hnsw::build helper.
The helper uses CAGRA-HNSW heuristics to set up optimal CAGRA build parameters based on the passed HNSW parameters. Unfortunately, this makes it impossible to modify individual CAGRA build parameters via the configs, which is necessary for benchmarking the performance of the heuristics themselves.
This PR reverts the relevant files to bring back the old behavior.

@achirkin achirkin self-assigned this Jul 2, 2026
@achirkin achirkin requested a review from a team as a code owner July 2, 2026 06:51
@achirkin achirkin added bug Something isn't working non-breaking Introduces a non-breaking change labels Jul 2, 2026
cuvs_cagra<T, IdxT> cagra_wrapper{this->metric_, this->dim_, bps};

// build the CAGRA index
cagra_wrapper.build(dataset, nrow);

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.

Let's assume that the dataset is large and the user only provides M and ef_construction parameters. We would want the benchmark to fall back to ACE if needed. hnsw::build() enables such fallback, but I think cagra::build() build does not. Let's look for an solution where the benchmark can also provide such fall-back if the user does not override the build algorithm.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working non-breaking Introduces a non-breaking change

Projects

Development

Successfully merging this pull request may close these issues.

2 participants