Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion agents.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# DiskANN Repository - Agent Onboarding Guide

**Last Updated**: 2026-02-11 (based on v0.45.0, Rust 1.92)
**Last Updated**: 2026-07-14 (based on v0.45.0, Rust 1.95)

This guide helps coding agents understand how to work efficiently with the DiskANN repository.

Expand Down
2 changes: 1 addition & 1 deletion diskann-benchmark-runner/src/internal/regression.rs
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ impl<'a> Checks<'a> {
// We can now package everything together!
debug_assert_eq!(input_to_parsed.len(), inputs.jobs().len());

let checks = std::iter::zip(inputs.into_inner(), input_to_parsed.into_iter())
let checks = std::iter::zip(inputs.into_inner(), input_to_parsed)
.map(|(input, index)| {
// This index should always be inbounds.
let inner = &parsed.inner[index];
Expand Down
6 changes: 3 additions & 3 deletions diskann-benchmark/src/index/search/knn.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ where
) -> anyhow::Result<Vec<SearchResults>> {
let results = core_search::search_all(
self.clone(),
parameters.into_iter(),
parameters,
core_search::graph::knn::Aggregator::new(
groundtruth,
recall_k,
Expand Down Expand Up @@ -140,7 +140,7 @@ where
) -> anyhow::Result<Vec<SearchResults>> {
let results = core_search::search_all(
self.clone(),
parameters.into_iter(),
parameters,
core_search::graph::knn::Aggregator::new(
groundtruth,
recall_k,
Expand Down Expand Up @@ -172,7 +172,7 @@ where
) -> anyhow::Result<Vec<SearchResults>> {
let results = core_search::search_all(
self.clone(),
parameters.into_iter(),
parameters,
core_search::graph::knn::Aggregator::new(
groundtruth,
recall_k,
Expand Down
2 changes: 1 addition & 1 deletion diskann-benchmark/src/index/search/range.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ where
) -> anyhow::Result<Vec<RangeSearchResults>> {
let results = core_search::search_all(
self.clone(),
parameters.into_iter(),
parameters,
core_search::graph::range::Aggregator::new(groundtruth),
)?;

Expand Down
6 changes: 2 additions & 4 deletions diskann-disk/src/search/provider/disk_provider.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1075,10 +1075,8 @@ where
stats,
};

for ((vertex_id, distance), associated_data) in indices
.into_iter()
.zip(distances.into_iter())
.zip(associated_data.into_iter())
for ((vertex_id, distance), associated_data) in
indices.into_iter().zip(distances).zip(associated_data)
{
search_result.results.push(SearchResultItem {
vertex_id,
Expand Down
3 changes: 3 additions & 0 deletions diskann-disk/src/search/provider/disk_sector_graph.rs
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,9 @@ impl<AlignedReaderType: AlignedFileReader> DiskSectorGraph<AlignedReaderType> {

#[inline]
/// Gets the index for the sector that contains the node with the given vertex_id
// The `else` branch is not a divide-by-zero guard: for the multiple-sectors-per-node
// layout it computes a genuinely different index, so `checked_div` does not model this.
#[allow(clippy::manual_checked_ops)]
pub fn node_sector_index(&self, vertex_id: u32) -> u64 {
1 + if self.num_nodes_per_sector > 0 {
vertex_id as u64 / self.num_nodes_per_sector
Expand Down
13 changes: 4 additions & 9 deletions diskann-garnet/src/provider.rs
Original file line number Diff line number Diff line change
Expand Up @@ -437,15 +437,10 @@ impl<T: VectorRepr> GarnetProvider<T> {
};

let quantizer = match &self.quantizer {
Some(q) => {
if !q.is_trained() {
q
} else {
// Quantizer already trained, bail.
return false;
}
}
None => return false,
// Only proceed when there is an untrained quantizer; a missing or
// already-trained quantizer means there is nothing to do, so bail.
Some(q) if !q.is_trained() => q,
_ => return false,
};

let rows = quantizer.required_vectors();
Expand Down
6 changes: 3 additions & 3 deletions diskann-wide/src/test_utils/dot_product.rs
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ mod tests {
for right in b {
let dot: i32 = (*left)
.into_iter()
.zip((*right).into_iter())
.zip(*right)
.map(|(l, r)| (l as i32) * (r as i32))
.sum();
for b in bases {
Expand Down Expand Up @@ -333,7 +333,7 @@ mod tests {
for right in a {
let dot: i32 = (*left)
.into_iter()
.zip((*right).into_iter())
.zip(*right)
.map(|(l, r)| (l as i32) * (r as i32))
.sum();
for b in bases {
Expand Down Expand Up @@ -370,7 +370,7 @@ mod tests {
for right in a {
let dot: u32 = (*left)
.into_iter()
.zip((*right).into_iter())
.zip(*right)
.map(|(l, r)| (l as u32) * (r as u32))
.sum();
for b in bases {
Expand Down
2 changes: 1 addition & 1 deletion rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[toolchain]
channel = "1.92"
channel = "1.95"
Loading