Skip to content

Fix setting CAGRA graph build algo to iterative search by default#1864

Merged
rapids-bot[bot] merged 1 commit intorapidsai:mainfrom
achirkin:fix-cagra-graph-build-params-default
Mar 4, 2026
Merged

Fix setting CAGRA graph build algo to iterative search by default#1864
rapids-bot[bot] merged 1 commit intorapidsai:mainfrom
achirkin:fix-cagra-graph-build-params-default

Conversation

@achirkin
Copy link
Copy Markdown
Contributor

@achirkin achirkin commented Mar 3, 2026

When there are no graph build parameters set up and no graph_build_algo set explicitly in the CAGRA build params, ANN_BENCH defaults to iterative search, effectively bypassing the algorithm selection logic. This PR fixes that.

Resolves #1849

@achirkin achirkin self-assigned this Mar 3, 2026
@achirkin achirkin requested a review from a team as a code owner March 3, 2026 07:21
@achirkin achirkin added bug Something isn't working non-breaking Introduces a non-breaking change labels Mar 3, 2026
@rapidsai rapidsai deleted a comment from copy-pr-bot Bot Mar 3, 2026
@@ -291,16 +296,18 @@ void parse_build_param(const nlohmann::json& conf, cuvs::neighbors::cagra::index
nlohmann::json nn_descent_conf = collect_conf_with_prefix(conf, "nn_descent_");
nlohmann::json ace_conf = collect_conf_with_prefix(conf, "ace_");
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.

Should we also collect iterative search params here and then check for that collected conf below in the monostate if condition?

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.

I think this will also require changes to collect_conf_with_prefix

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.

Thanks for noticing! No, the iterative search params are an empty data type - no parameters to collect

Copy link
Copy Markdown
Contributor

@tarang-jain tarang-jain left a comment

Choose a reason for hiding this comment

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

LGTM except one suggestion which need not necessarily be addressed in this PR

@achirkin
Copy link
Copy Markdown
Contributor Author

achirkin commented Mar 4, 2026

/merge

@rapids-bot rapids-bot Bot merged commit ba7a136 into rapidsai:main Mar 4, 2026
152 of 155 checks passed
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

Status: Done

Development

Successfully merging this pull request may close these issues.

[BUG] cuvs-bench CAGRA default build algo

2 participants