Skip to content
Open
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
15 changes: 0 additions & 15 deletions diskann-disk/src/build/configuration/filter_parameter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,6 @@

use crate::data_model::GraphDataType;

pub type AssociatedDataFilter<Data> =
Box<dyn Fn(&<Data as GraphDataType>::AssociatedDataType) -> bool>;

pub fn default_associated_data_filter<Data: GraphDataType>() -> AssociatedDataFilter<Data> {
Box::new(|_| true)
}

pub type VectorFilter<'a, Data> =
Box<dyn Fn(&<Data as GraphDataType>::VectorIdType) -> bool + Send + Sync + 'a>;

Expand All @@ -26,14 +19,6 @@ mod tests {

type TestGraphData = GraphDataF32VectorUnitData;

#[test]
fn test_default_associated_data_filter_returns_true_for_all() {
let filter = default_associated_data_filter::<TestGraphData>();
// Test that the default filter always returns true
assert!(filter(&()));
assert!(filter(&()));
}

#[test]
fn test_default_vector_filter_returns_true_for_all() {
let filter = default_vector_filter::<TestGraphData>();
Expand Down
246 changes: 0 additions & 246 deletions diskann-tools/src/utils/build_disk_index.rs

This file was deleted.

9 changes: 0 additions & 9 deletions diskann-tools/src/utils/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,6 @@ pub use ground_truth::*;
// pub mod range_search_disk_index;
// pub use range_search_disk_index::*;

pub mod search_disk_index;
pub use search_disk_index::*;

pub mod build_disk_index;
pub use build_disk_index::*;

pub mod build_pq;
pub use build_pq::*;

Expand All @@ -39,9 +33,6 @@ pub use generate_synthetic_labels_utils::*;
pub mod gen_associated_data_from_range;
pub use gen_associated_data_from_range::*;

pub mod test_utils;
pub use test_utils::*;

pub type CMDResult<T> = Result<T, CMDToolError>;

pub mod parameter_helper;
Expand Down
23 changes: 22 additions & 1 deletion diskann-tools/src/utils/random_data_generator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,28 @@ mod tests {
use rstest::rstest;

use super::*;
use crate::utils::size_constants::{TEST_DATASET_SIZE_SMALL, TEST_NUM_DIMENSIONS_RECOMMENDED};

/// The small dataset size for testing the library.
/// A prime number is used to avoid any accidental patterns in the data.
#[cfg(not(miri))]
const TEST_DATASET_SIZE_SMALL: u64 = 101;

/// The recommended number of dimensions for testing the library.
/// A prime number is used to avoid any accidental patterns in the data.
/// When "memory aligned" the dimensions become 64 (8*8). Setting to non-aligned value to ensure aligning works.
#[cfg(not(miri))]
const TEST_NUM_DIMENSIONS_RECOMMENDED: usize = 59;

/// The small dataset size for testing the library.
/// A prime number is used to avoid any accidental patterns in the data.
#[cfg(miri)]
const TEST_DATASET_SIZE_SMALL: u64 = 3;

/// The recommended number of dimensions for testing the library.
/// A prime number is used to avoid any accidental patterns in the data.
/// When "memory aligned" the dimensions become 16 (8*2). Setting to non-aligned value to ensure aligning works.
#[cfg(miri)]
const TEST_NUM_DIMENSIONS_RECOMMENDED: usize = 13;

#[rstest]
fn random_data_write_success(
Expand Down
Loading
Loading