Skip to content

Informative warnings for CAGRA construction with low intermediate degree#2217

Open
landrumb wants to merge 2 commits into
rapidsai:mainfrom
landrumb:landrumb/cagra-degree-warning
Open

Informative warnings for CAGRA construction with low intermediate degree#2217
landrumb wants to merge 2 commits into
rapidsai:mainfrom
landrumb:landrumb/cagra-degree-warning

Conversation

@landrumb
Copy link
Copy Markdown

@landrumb landrumb commented Jun 4, 2026

Resolves #2033 with more informative warnings about the intermediate graph degree parameter.

@copy-pr-bot
Copy link
Copy Markdown

copy-pr-bot Bot commented Jun 4, 2026

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.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Jun 4, 2026

Review Change Stack

📝 Walkthrough

Walkthrough

This PR improves diagnostic messaging for CAGRA graph building by adding a pre-build warning when intermediate graph degree is below recommended levels and enhancing the GPU pruning failure message with specific guidance and calculated recommendations for the intermediate degree parameter.

Changes

CAGRA Graph Degree Diagnostics

Layer / File(s) Summary
Intermediate degree validation and diagnostic messages
cpp/src/neighbors/detail/cagra/cagra_build.cuh, cpp/src/neighbors/detail/cagra/graph_core.cuh
check_graph_degree adds a warning when intermediate_degree falls below the recommended 1.5 * graph_degree, noting disconnection risk. prune_graph_gpu assertion failure now computes and reports the recommended intermediate degree and instructs users about degree requirements and potential invalid neighbor causes.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
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.
Description check ✅ Passed The pull request description clearly describes the purpose of the changes: adding informative warnings about the intermediate graph degree parameter to resolve issue #2033.
Title check ✅ Passed The title accurately describes the main change: adding informative warnings for CAGRA construction when intermediate degree is low, which matches the modifications in both files.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

@divyegala
Copy link
Copy Markdown
Member

Could you make the PR title more specific and descriptive please? As we use squash commits, the PR title acts as the commit message after the PR is merged.

@landrumb landrumb changed the title added informative warnings Informative warnings for CAGRA construction with low intermediate degree Jun 4, 2026
@cjnolet cjnolet added doc Improvements or additions to documentation non-breaking Introduces a non-breaking change labels Jun 5, 2026
@cjnolet cjnolet moved this to In Progress in Unstructured Data Processing Jun 5, 2026
@cjnolet
Copy link
Copy Markdown
Member

cjnolet commented Jun 5, 2026

/ok to test 41ac9af

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

Labels

doc Improvements or additions to documentation non-breaking Introduces a non-breaking change

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

[BUG] Better warning / assert and handling of cases where CAGRA graph degree is not strictly larger than intermediate graph degree.

3 participants