Skip to content

Move k-means implementation from diskann-providers to diskann-disk - #933

Merged
Alex Razumov (arrayka) merged 3 commits into
mainfrom
copilot/move-kmeans-to-diskann-disk
Apr 10, 2026
Merged

Move k-means implementation from diskann-providers to diskann-disk#933
Alex Razumov (arrayka) merged 3 commits into
mainfrom
copilot/move-kmeans-to-diskann-disk

Conversation

Copilot AI commented Apr 9, 2026

Copy link
Copy Markdown
Contributor

K-means in diskann-providers was the last consumer of the old BLAS-based clustering path; PQ training has since migrated to diskann-quantization. The only active call site remaining was disk-index partitioning in diskann-disk.

We will keep diskann-providers's implementation for now and move it to diskann-disk, rather than switching to the one in diskann-quantization, for the following reasons:

  • K-means in diskann-providers performs better at higher dimensions (>100):
image
  • K-means in diskann-providers supports multi-threading:
image

We will work on closing these performance gaps and converging the two implementations in separate PRs.

Changes in this PR

diskann-disk

  • Added src/utils/kmeans.rs — k-means implementation moved from diskann-providers
  • Added src/utils/math_util.rs — mathematical utilities (compute_vecs_l2sq, compute_closest_centers, compute_closest_centers_in_block, and helpers) extracted from diskann-providers and deduplicated
  • Exported k_means_clustering, k_meanspp_selecting_pivots, run_lloyds, compute_vecs_l2sq, compute_closest_centers, compute_closest_centers_in_block from utils/mod.rs
  • Updated utils/partition.rs to import kmeans functions and math utilities from local modules instead of diskann-providers
  • Moved kmeans criterion and iai-callgrind benchmarks from diskann-providers/benches to diskann-disk/benches
  • Added proptest and approx to dev-dependencies

diskann-providers

  • Deleted src/utils/kmeans.rs
  • Removed k_means_clustering, k_meanspp_selecting_pivots, run_lloyds, compute_vecs_l2sq, compute_vec_l2sq from the public API
  • Removed the now-deduplicated math utility implementations from math_util.rs
  • Removed dead OPQ code: generate_optimized_pq_pivots, opq_quantize_all_chunks, copy_chunk_centroids_to_full_table, their test, and unused imports/constants — these were the sole remaining callers of k-means in this crate and were already gated behind #[allow(dead_code)]

@arrayka

Copy link
Copy Markdown
Contributor

Copilot update the PR description to reflect the recent changes

Copilot AI commented Apr 10, 2026

Copy link
Copy Markdown
Contributor Author

Copilot update the PR description to reflect the recent changes

Updated. The description now reflects all changes including the subsequent math_util.rs extraction into diskann-disk and the deduplication of compute_vecs_l2sq/compute_closest_centers.

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 94.35028% with 20 lines in your changes missing coverage. Please review.
✅ Project coverage is 89.33%. Comparing base (ea37491) to head (1639a95).

Files with missing lines Patch % Lines
diskann-disk/src/utils/math_util.rs 94.36% 19 Missing ⚠️
diskann-disk/src/utils/kmeans.rs 94.11% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #933      +/-   ##
==========================================
- Coverage   89.38%   89.33%   -0.06%     
==========================================
  Files         447      448       +1     
  Lines       84299    84054     -245     
==========================================
- Hits        75353    75089     -264     
- Misses       8946     8965      +19     
Flag Coverage Δ
miri 89.33% <94.35%> (-0.06%) ⬇️
unittests 89.17% <94.35%> (-0.06%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
diskann-disk/src/utils/partition.rs 92.54% <ø> (ø)
diskann-providers/src/model/pq/pq_construction.rs 91.03% <ø> (-1.12%) ⬇️
diskann-providers/src/utils/math_util.rs 95.18% <ø> (+0.54%) ⬆️
diskann-disk/src/utils/kmeans.rs 90.86% <94.11%> (ø)
diskann-disk/src/utils/math_util.rs 94.36% <94.36%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copilot AI left a comment

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.

Pull request overview

Moves the legacy BLAS-based, multithreaded k-means implementation out of diskann-providers and into diskann-disk, aligning the code with its only remaining production call site (disk index partitioning) while removing dead OPQ-related clustering code from providers.

Changes:

  • Add diskann-disk::utils::{kmeans, math_util} and re-export clustering + closest-center utilities from diskann-disk::utils.
  • Update disk partitioning to use the newly-local k-means/math utilities.
  • Remove k-means exports, k-means benchmarks, and dead OPQ code from diskann-providers; move corresponding benchmarks to diskann-disk and add dev-deps for tests.

Reviewed changes

Copilot reviewed 18 out of 19 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
diskann-providers/src/utils/mod.rs Stops re-exporting k-means + closest-center math utilities from providers.
diskann-providers/src/utils/math_util.rs Removes k-means/closest-center math utilities, leaving residual/vector helpers.
diskann-providers/src/model/pq/pq_construction.rs Deletes dead OPQ code that depended on the old k-means path; removes unused imports/constants.
diskann-providers/benches/benchmarks/mod.rs Drops k-means criterion benchmark module from providers.
diskann-providers/benches/benchmarks_iai/mod.rs Drops k-means iai-callgrind benchmark module from providers.
diskann-providers/benches/bench_main.rs Removes k-means criterion benchmark registration from providers.
diskann-providers/benches/bench_main_iai.rs Removes k-means iai-callgrind benchmark registration from providers.
diskann-disk/src/utils/partition.rs Switches partitioning to import k-means + closest-center utilities from diskann-disk::utils.
diskann-disk/src/utils/mod.rs Exposes new math_util and kmeans modules + re-exports their APIs.
diskann-disk/src/utils/math_util.rs Introduces closest-center and L2-norm utilities (moved/deduped from providers) with tests.
diskann-disk/src/utils/kmeans.rs Introduces k-means++ pivot selection and Lloyd’s algorithm (moved from providers) with tests/proptests.
diskann-disk/Cargo.toml Adds approx and proptest to dev-dependencies to support moved tests.
diskann-disk/benches/benchmarks/mod.rs Registers the moved criterion k-means benchmarks in disk crate.
diskann-disk/benches/benchmarks/kmeans_bench.rs Adds criterion benchmark using diskann-disk::utils k-means/math utilities.
diskann-disk/benches/benchmarks_iai/mod.rs Registers the moved iai-callgrind k-means benchmarks in disk crate.
diskann-disk/benches/benchmarks_iai/kmeans_bench_iai.rs Adds iai-callgrind benchmark using diskann-disk::utils k-means/math utilities.
diskann-disk/benches/bench_main.rs Registers k-means criterion benchmark entrypoint in disk crate.
diskann-disk/benches/bench_main_iai.rs Registers k-means iai-callgrind benchmark entrypoint in disk crate.
Cargo.lock Records new dev-dependency resolution for approx and proptest in diskann-disk.
Comments suppressed due to low confidence (2)

diskann-disk/src/utils/kmeans.rs:314

  • sum clamps f32::INFINITY distances to f32::MAX, but later prefix_sum is built from the original pivot_dist values. If any pivot_dist is INFINITY (e.g., squared L2 overflow for large coordinates), prefix_sum can become inf while sum is finite, triggering the "Prefix sum should not be greater than sum" error even though the algorithm could proceed. Handle INFINITY consistently (either allow sum to be infinite in f64, or clamp/filter distances both when computing sum and when accumulating prefix_sum).
    diskann-disk/src/utils/kmeans.rs:972
  • The proptest names use k_meansspp_... (double 's'), which looks like a typo of k_meanspp_... and makes these tests harder to grep/relate to the k-means++ implementation. Consider renaming the test functions for consistency.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread diskann-disk/src/utils/math_util.rs
Comment thread diskann-disk/src/utils/math_util.rs
Comment thread diskann-disk/src/utils/math_util.rs

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.

Didn't note that the OPQ was already marked with dead_code. Nice find. I think Aditya Krishnan (@arkrishn94) is also rooting out the rest of the OPQ plumbing. I think the conflict shouldn't be too bad.

@arrayka
Alex Razumov (arrayka) enabled auto-merge (squash) April 10, 2026 18:13

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.

Looks good. Will remove the rest of the OPQ plumbing in a quick follow up

@arrayka
Alex Razumov (arrayka) merged commit 8341f6d into main Apr 10, 2026
28 checks passed
@arrayka
Alex Razumov (arrayka) deleted the copilot/move-kmeans-to-diskann-disk branch April 10, 2026 18:15
Haiyang (hailangx) pushed a commit that referenced this pull request Apr 16, 2026
)

K-means in `diskann-providers` was the last consumer of the old
BLAS-based clustering path; PQ training has since migrated to
`diskann-quantization`. The only active call site remaining was
disk-index partitioning in `diskann-disk`.

We will keep diskann-providers's implementation for now and move it to
`diskann-disk`, rather than switching to the one in
diskann-quantization, for the following reasons:
- K-means in diskann-providers performs better at higher dimensions
(>100):
<img width="618" height="507" alt="image"
src="https://github.com/user-attachments/assets/1e483411-18ae-4cc7-aa59-d9df05f4e0cf"
/>

- K-means in diskann-providers supports multi-threading:
<img width="612" height="503" alt="image"
src="https://github.com/user-attachments/assets/f5219632-6223-45fe-b0e0-18d40f0e2a1d"
/>

We will work on closing these performance gaps and converging the two
implementations in separate PRs.

# Changes in this PR

## diskann-disk
- Added `src/utils/kmeans.rs` — k-means implementation moved from
`diskann-providers`
- Added `src/utils/math_util.rs` — mathematical utilities
(`compute_vecs_l2sq`, `compute_closest_centers`,
`compute_closest_centers_in_block`, and helpers) extracted from
`diskann-providers` and deduplicated
- Exported `k_means_clustering`, `k_meanspp_selecting_pivots`,
`run_lloyds`, `compute_vecs_l2sq`, `compute_closest_centers`,
`compute_closest_centers_in_block` from `utils/mod.rs`
- Updated `utils/partition.rs` to import kmeans functions and math
utilities from local modules instead of `diskann-providers`
- Moved kmeans criterion and iai-callgrind benchmarks from
`diskann-providers/benches` to `diskann-disk/benches`
- Added `proptest` and `approx` to dev-dependencies

## diskann-providers
- Deleted `src/utils/kmeans.rs`
- Removed `k_means_clustering`, `k_meanspp_selecting_pivots`,
`run_lloyds`, `compute_vecs_l2sq`, `compute_vec_l2sq` from the public
API
- Removed the now-deduplicated math utility implementations from
`math_util.rs`
- Removed dead OPQ code: `generate_optimized_pq_pivots`,
`opq_quantize_all_chunks`, `copy_chunk_centroids_to_full_table`, their
test, and unused imports/constants — these were the sole remaining
callers of k-means in this crate and were already gated behind
`#[allow(dead_code)]`

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: arrayka <1551741+arrayka@users.noreply.github.com>
Co-authored-by: Alex Razumov (from Dev Box) <alrazu@microsoft.com>
Aditya Krishnan (arkrishn94) added a commit that referenced this pull request Apr 22, 2026
Bumping to 0.50.1 to propagate changes to consumers.

Changes since previous bump: 

## What's Changed
* Add more agentic guard rails by @hildebrandmw in
#871
* Cleanup `diskann-benchmark-runner` and friends. by @hildebrandmw in
#865
* Use `--all-targets` for the no-default-features CI run. by
@hildebrandmw in #874
* Remove unused `normalizing_util.rs` from `diskann-providers` by
@Copilot in #902
* Benchmark Support for A/B Tests by @hildebrandmw in
#900
* [diskann-garnet] Bump diskann-garnet to 1.0.26 by @tiagonapoli in
#925
* Remove the `AdjacencyList` from `diskann-providers` by @hildebrandmw
in #915
* [PQ cleanup] Part 1: Move pq_scratch, quantizer_preprocess and
pq_dataset to `diskann-disk` by @arkrishn94 in
#930
* Forbid Debug in diskann-benchmark by @arrayka in
#914
* Remove DebugProvider by @JordanMaples in
#923
* [diskann-garnet] Create workflow to publish to nuget by @tiagonapoli
in #926
* Move k-means implementation from diskann-providers to diskann-disk by
@Copilot in #933
* Inline minmax distance evaluations by @arkrishn94 in
#935
* Use `rust-toolchain.toml` in CI by @hildebrandmw in
#934
* Add a globally blocking CI gate. by @hildebrandmw in
#932
* Remove `utils/math_util.rs` from `diskann-providers` by @Copilot in
#921
* Bump rand from 0.9.2 to 0.9.3 by @dependabot[bot] in
#945
* Remove OPQ and friends by @arkrishn94 in
#947
* Migrate test_flaky_consolidate from diskann_providers to diskann by
@JordanMaples in #942
* Remove GraphDataType from diskann-providers by @wuw92 in
#950
* Remove unused method extract_best_l_candidates in
NeighborPriorityQueue by @doliawu in
#951
* Add `Debug` bounds to `VectorRepr`'s distance GATs. by @hildebrandmw
in #948
* Add benchmark pipeline with Rust-native A/B validation by
@YuanyuanTian-hh in #912
* Remove unnecessary `Default` bound from `Neighbor`'s `VectorIdType` by
@doliawu in #956
* Replace `AlignedBoxWithSlice` with plain `Vec` / `Matrix` where
alignment is unused by @wuw92 in
#955
* [minmax] 8-bit benchmark by @arkrishn94 in
#959
* Add `MultiInsertStrategy` implementations for `BfTreeProvider` by
@hildebrandmw in #949
* Replace `AlignedBoxWithSlice` with `Vec` in PQScratch and disk fp
vector caches by @wuw92 in #960
* Adding unit tests for paged_search by @JordanMaples in
#962
* Remove AlignedBoxWithSlice wrapper and add alias to Poly<[T],
AlignedAllocator> by @JordanMaples in
#965
* Remove synthetic/structured data generation from diskann-providers by
@JordanMaples in #963
* added tests and some baselines for range_search by @JordanMaples in
#961

## New Contributors
* @JordanMaples made their first contribution in
#923
* @wuw92 made their first contribution in
#950
* @doliawu made their first contribution in
#951
* @YuanyuanTian-hh made their first contribution in
#912

**Full Changelog**:
v0.50.0...v0.50.1
Alex Razumov (arrayka) added a commit that referenced this pull request Apr 28, 2026
…ms_squared is provided (#980)

This PR addresses a memory optimization opportunity identified in #933 .
The `compute_closest_centers()` function was unnecessarily allocating
O(num_points) memory when `pts_norms_squared` was provided by the
caller.

### Problem

Previously, when pre-computed norms were passed in, the code would clone
the entire vector even though it only needed read access:
```
  let pts_norms_squared = if let Some(pts_norms) = pts_norms_squared {
      pts_norms.to_vec()  // Unnecessary allocation
  } else {
      // Compute norms...
  };
```

### Solution

The fix uses a borrowed slice pattern to avoid allocation when norms are
provided, while still allocating when they need to be computed:
```
  let mut owned_pts_norms_squared;
  let pts_norms_squared: &[f32] = if let Some(pts_norms) = pts_norms_squared {
      if pts_norms.len() != num_points {
          return Err(ANNError::log_pq_error(...));
      }
      pts_norms  // Zero-cost borrowing
  } else {
      owned_pts_norms_squared = vec![0.0; num_points];
      compute_vecs_l2sq(&mut owned_pts_norms_squared, data, num_points, dim, pool)?;
      &owned_pts_norms_squared
  };
```

### Additional Improvements

- Added input validation to `ensure pts_norms_squared` has the correct
length when provided
- Added tests verifying that *pre-computed norms* produce identical
results to computing them on-the-fly
- Improved input validation coverage across math utility functions with
comprehensive error message tests
- Removed redundant `num_points` parameter from `compute_vecs_l2sq`
function. It also addresses another follow-up item: #937

---------

Co-authored-by: Alex Razumov (from Dev Box) <alrazu@microsoft.com>
weiyaoluo (SeliMeli) pushed a commit to SeliMeli/DiskANN that referenced this pull request Jul 22, 2026
…icrosoft#933)

K-means in `diskann-providers` was the last consumer of the old
BLAS-based clustering path; PQ training has since migrated to
`diskann-quantization`. The only active call site remaining was
disk-index partitioning in `diskann-disk`.

We will keep diskann-providers's implementation for now and move it to
`diskann-disk`, rather than switching to the one in
diskann-quantization, for the following reasons:
- K-means in diskann-providers performs better at higher dimensions
(>100):
<img width="618" height="507" alt="image"
src="https://github.com/user-attachments/assets/1e483411-18ae-4cc7-aa59-d9df05f4e0cf"
/>

- K-means in diskann-providers supports multi-threading:
<img width="612" height="503" alt="image"
src="https://github.com/user-attachments/assets/f5219632-6223-45fe-b0e0-18d40f0e2a1d"
/>

We will work on closing these performance gaps and converging the two
implementations in separate PRs.

# Changes in this PR

## diskann-disk
- Added `src/utils/kmeans.rs` — k-means implementation moved from
`diskann-providers`
- Added `src/utils/math_util.rs` — mathematical utilities
(`compute_vecs_l2sq`, `compute_closest_centers`,
`compute_closest_centers_in_block`, and helpers) extracted from
`diskann-providers` and deduplicated
- Exported `k_means_clustering`, `k_meanspp_selecting_pivots`,
`run_lloyds`, `compute_vecs_l2sq`, `compute_closest_centers`,
`compute_closest_centers_in_block` from `utils/mod.rs`
- Updated `utils/partition.rs` to import kmeans functions and math
utilities from local modules instead of `diskann-providers`
- Moved kmeans criterion and iai-callgrind benchmarks from
`diskann-providers/benches` to `diskann-disk/benches`
- Added `proptest` and `approx` to dev-dependencies

## diskann-providers
- Deleted `src/utils/kmeans.rs`
- Removed `k_means_clustering`, `k_meanspp_selecting_pivots`,
`run_lloyds`, `compute_vecs_l2sq`, `compute_vec_l2sq` from the public
API
- Removed the now-deduplicated math utility implementations from
`math_util.rs`
- Removed dead OPQ code: `generate_optimized_pq_pivots`,
`opq_quantize_all_chunks`, `copy_chunk_centroids_to_full_table`, their
test, and unused imports/constants — these were the sole remaining
callers of k-means in this crate and were already gated behind
`#[allow(dead_code)]`

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: arrayka <1551741+arrayka@users.noreply.github.com>
Co-authored-by: Alex Razumov (from Dev Box) <alrazu@microsoft.com>
weiyaoluo (SeliMeli) pushed a commit to SeliMeli/DiskANN that referenced this pull request Jul 22, 2026
Bumping to 0.50.1 to propagate changes to consumers.

Changes since previous bump:

* Add more agentic guard rails by @hildebrandmw in
microsoft#871
* Cleanup `diskann-benchmark-runner` and friends. by @hildebrandmw in
microsoft#865
* Use `--all-targets` for the no-default-features CI run. by
@hildebrandmw in microsoft#874
* Remove unused `normalizing_util.rs` from `diskann-providers` by
@Copilot in microsoft#902
* Benchmark Support for A/B Tests by @hildebrandmw in
microsoft#900
* [diskann-garnet] Bump diskann-garnet to 1.0.26 by @tiagonapoli in
microsoft#925
* Remove the `AdjacencyList` from `diskann-providers` by @hildebrandmw
in microsoft#915
* [PQ cleanup] Part 1: Move pq_scratch, quantizer_preprocess and
pq_dataset to `diskann-disk` by @arkrishn94 in
microsoft#930
* Forbid Debug in diskann-benchmark by @arrayka in
microsoft#914
* Remove DebugProvider by @JordanMaples in
microsoft#923
* [diskann-garnet] Create workflow to publish to nuget by @tiagonapoli
in microsoft#926
* Move k-means implementation from diskann-providers to diskann-disk by
@Copilot in microsoft#933
* Inline minmax distance evaluations by @arkrishn94 in
microsoft#935
* Use `rust-toolchain.toml` in CI by @hildebrandmw in
microsoft#934
* Add a globally blocking CI gate. by @hildebrandmw in
microsoft#932
* Remove `utils/math_util.rs` from `diskann-providers` by @Copilot in
microsoft#921
* Bump rand from 0.9.2 to 0.9.3 by @dependabot[bot] in
microsoft#945
* Remove OPQ and friends by @arkrishn94 in
microsoft#947
* Migrate test_flaky_consolidate from diskann_providers to diskann by
@JordanMaples in microsoft#942
* Remove GraphDataType from diskann-providers by @wuw92 in
microsoft#950
* Remove unused method extract_best_l_candidates in
NeighborPriorityQueue by @doliawu in
microsoft#951
* Add `Debug` bounds to `VectorRepr`'s distance GATs. by @hildebrandmw
in microsoft#948
* Add benchmark pipeline with Rust-native A/B validation by
@YuanyuanTian-hh in microsoft#912
* Remove unnecessary `Default` bound from `Neighbor`'s `VectorIdType` by
@doliawu in microsoft#956
* Replace `AlignedBoxWithSlice` with plain `Vec` / `Matrix` where
alignment is unused by @wuw92 in
microsoft#955
* [minmax] 8-bit benchmark by @arkrishn94 in
microsoft#959
* Add `MultiInsertStrategy` implementations for `BfTreeProvider` by
@hildebrandmw in microsoft#949
* Replace `AlignedBoxWithSlice` with `Vec` in PQScratch and disk fp
vector caches by @wuw92 in microsoft#960
* Adding unit tests for paged_search by @JordanMaples in
microsoft#962
* Remove AlignedBoxWithSlice wrapper and add alias to Poly<[T],
AlignedAllocator> by @JordanMaples in
microsoft#965
* Remove synthetic/structured data generation from diskann-providers by
@JordanMaples in microsoft#963
* added tests and some baselines for range_search by @JordanMaples in
microsoft#961

* @JordanMaples made their first contribution in
microsoft#923
* @wuw92 made their first contribution in
microsoft#950
* @doliawu made their first contribution in
microsoft#951
* @YuanyuanTian-hh made their first contribution in
microsoft#912

**Full Changelog**:
microsoft/DiskANN@v0.50.0...v0.50.1
weiyaoluo (SeliMeli) pushed a commit to SeliMeli/DiskANN that referenced this pull request Jul 22, 2026
…ms_squared is provided (microsoft#980)

This PR addresses a memory optimization opportunity identified in microsoft#933 .
The `compute_closest_centers()` function was unnecessarily allocating
O(num_points) memory when `pts_norms_squared` was provided by the
caller.

### Problem

Previously, when pre-computed norms were passed in, the code would clone
the entire vector even though it only needed read access:
```
  let pts_norms_squared = if let Some(pts_norms) = pts_norms_squared {
      pts_norms.to_vec()  // Unnecessary allocation
  } else {
      // Compute norms...
  };
```

### Solution

The fix uses a borrowed slice pattern to avoid allocation when norms are
provided, while still allocating when they need to be computed:
```
  let mut owned_pts_norms_squared;
  let pts_norms_squared: &[f32] = if let Some(pts_norms) = pts_norms_squared {
      if pts_norms.len() != num_points {
          return Err(ANNError::log_pq_error(...));
      }
      pts_norms  // Zero-cost borrowing
  } else {
      owned_pts_norms_squared = vec![0.0; num_points];
      compute_vecs_l2sq(&mut owned_pts_norms_squared, data, num_points, dim, pool)?;
      &owned_pts_norms_squared
  };
```

### Additional Improvements

- Added input validation to `ensure pts_norms_squared` has the correct
length when provided
- Added tests verifying that *pre-computed norms* produce identical
results to computing them on-the-fly
- Improved input validation coverage across math utility functions with
comprehensive error message tests
- Removed redundant `num_points` parameter from `compute_vecs_l2sq`
function. It also addresses another follow-up item: microsoft#937

---------

Co-authored-by: Alex Razumov (from Dev Box) <alrazu@microsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Get rid of utils/kmeans.rs

6 participants