Cleaning up test work and changing the get_degree_stats signature.#998
Cleaning up test work and changing the get_degree_stats signature.#998JordanMaples wants to merge 6 commits intomainfrom
Conversation
Codecov Report❌ Patch coverage is ❌ Your patch status has failed because the patch coverage (88.39%) is below the target coverage (90.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## main #998 +/- ##
==========================================
- Coverage 90.69% 89.47% -1.22%
==========================================
Files 459 460 +1
Lines 85030 85327 +297
==========================================
- Hits 77115 76344 -771
- Misses 7915 8983 +1068
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Cleans up and reorganizes test utilities while changing get_degree_stats to accept an explicit iterator of IDs (instead of requiring providers to implement IntoIterator).
Changes:
- Updated
get_degree_stats(and sync wrapper) to take anIntoIteratorof IDs to compute degree stats for. - Removed/relocated lower-signal tests and improved test assertions for
DegreeStats. - Simplified 2D-square test setup helpers and refactored neighbor access in the test provider.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| diskann/src/graph/test/provider.rs | Adds ID iterators + refactors neighbor retrieval; removes IntoIterator impl. |
| diskann/src/graph/test/cases/inplace_delete.rs | Adapts tests to new setup_2d_square helper signature. |
| diskann/src/graph/test/cases/index.rs | Removes paged-search tests; updates degree-stats tests for new API. |
| diskann/src/graph/test/cases/helpers.rs | Simplifies helper by internalizing vector generation (removes Matrix param). |
| diskann/src/graph/test/cases/consolidate.rs | Adapts consolidation tests to new helper signature. |
| diskann/src/graph/index.rs | Changes get_degree_stats signature; moves QueryLabelProvider test here; adds verbose-eq for DegreeStats. |
| diskann-providers/src/index/wrapped_async.rs | Updates sync wrapper to pass ID iterator through to async API. |
| diskann-providers/src/index/diskann_async.rs | Updates provider-side tests to pass iterators into get_degree_stats. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
cb1b8c5 to
a302b66
Compare
a302b66 to
16a1d16
Compare
hildebrandmw
left a comment
There was a problem hiding this comment.
Just a small couple requests - otherwise looks good. Thanks!
This is a quick cleanup PR for some of the changes that went in the other day.
In test/cases/index.rs there were a bunch of paged_search tests that on the whole are lower signal than the baseline-related paged_search tests added in a different PR, so those are being removed.
tests for the QueryLabelProvider were moved to the trait defn location for additional documentation purposes on how we intend the trait to be used.
In the initial test authoring, I added an IntoIterator trait implementation to the test provider in the goals of testing get_degree_stats. After syncing with Mark, we agreed that the better approach was to change the way that get_degree_stats behaves, now it accepts an iterator to the ids that you want the degree stats for rather than forcing the provider to implement IntoIterator.
There are still some areas that I'm cleaning up. In particular: helpers.rs, while it does help to set up some tests, naming is not the best and there are still some layers of boilerplate that can be eliminated by spending a bit more time handcrafting a solution.