Remove utils/kmeans.rs and migrate disk partitioning to diskann-quantization KMeans#920
Draft
Remove utils/kmeans.rs and migrate disk partitioning to diskann-quantization KMeans#920
utils/kmeans.rs and migrate disk partitioning to diskann-quantization KMeans#920Conversation
1 task
…lementation Agent-Logs-Url: https://github.com/microsoft/DiskANN/sessions/1ca04e7b-0d14-4bf2-bf4a-bade1b591518 Co-authored-by: arrayka <1551741+arrayka@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Remove utils/kmeans.rs and use diskann-quantization implementation
Remove Apr 8, 2026
utils/kmeans.rs and migrate disk partitioning to diskann-quantization KMeans
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #920 +/- ##
==========================================
- Coverage 89.34% 89.27% -0.07%
==========================================
Files 444 443 -1
Lines 83986 83131 -855
==========================================
- Hits 75036 74217 -819
+ Misses 8950 8914 -36
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
diskann-providers/src/utils/kmeans.rswas the last home-grown KMeans implementation remaining after PQ moved todiskann-quantization. This removes it entirely, replacing its users with the quantization crate'skmeans_plusplus_into+lloydsAPI.Changes
diskann-providers/src/utils/kmeans.rs— removesk_means_clustering,k_meanspp_selecting_pivots,run_lloyds, and all helpers (~989 lines).k_means_clustering/k_meanspp_selecting_pivots/run_lloydsfromdiskann-providers::utilspublic API.diskann-disk/src/utils/partition.rs— the only live user; now callskmeans_plusplus_into+lloydsviaMatrixBaseviews:pq_construction.rs— removed the already-deadgenerate_optimized_pq_pivots/opq_quantize_all_chunks/copy_chunk_centroids_to_full_tablefunctions (and their test) that were the only remaining callers of the old API within this file.kmeans_bench.rs,kmeans_bench_iai.rs) — updated to benchmark thediskann-quantizationimplementation.