Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TST] Move rust benchmark crate to test crate #2900

Merged
Merged
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
49 changes: 25 additions & 24 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
resolver = "2"

members = [
"rust/benchmark-datasets",
"rust/blockstore",
"rust/cache",
"rust/chroma",
Expand All @@ -13,6 +12,7 @@ members = [
"rust/storage",
"rust/types",
"rust/worker",
"rust/test",
]

[workspace.dependencies]
Expand Down Expand Up @@ -44,7 +44,7 @@ chroma-cache = { path = "rust/cache" }
chroma-types = { path = "rust/types" }
chroma-index = { path = "rust/index" }
chroma-distance = { path = "rust/distance" }
chroma-benchmark-datasets = { path = "rust/benchmark-datasets" }
chroma-test = { path = "rust/test" }
worker = { path = "rust/worker" }

# Dev dependencies
Expand Down
3 changes: 0 additions & 3 deletions rust/benchmark-datasets/src/lib.rs

This file was deleted.

2 changes: 1 addition & 1 deletion rust/index/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ chroma-distance = { workspace = true }
tempfile = { workspace = true }
rayon = { workspace = true }
criterion = { workspace = true }
chroma-benchmark-datasets = { workspace = true }
chroma-test = { workspace = true }
indicatif = "0.17.8"
anyhow = "1.0.89"

Expand Down
2 changes: 1 addition & 1 deletion rust/index/benches/dataset_utilities.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use std::time::Duration;

use chroma_benchmark_datasets::types::{FrozenQuerySubset, QueryDataset, RecordDataset};
use chroma_test::datasets::types::{FrozenQuerySubset, QueryDataset, RecordDataset};
use futures::TryFutureExt;
use indicatif::{MultiProgress, ProgressBar, ProgressStyle};

Expand Down
7 changes: 3 additions & 4 deletions rust/index/benches/full_text.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
use std::sync::Arc;

use anyhow::Result;
use chroma_benchmark_datasets::{
datasets::{ms_marco_queries::MicrosoftMarcoQueriesDataset, scidocs::SciDocsDataset},
types::RecordDataset,
};
use chroma_blockstore::{arrow::provider::ArrowBlockfileProvider, provider::BlockfileProvider};
use chroma_cache::{
cache::Cache,
Expand All @@ -15,6 +11,9 @@ use chroma_index::fulltext::{
types::{FullTextIndexReader, FullTextIndexWriter},
};
use chroma_storage::{local::LocalStorage, Storage};
use chroma_test::datasets::{
ms_marco_queries::MicrosoftMarcoQueriesDataset, scidocs::SciDocsDataset, types::RecordDataset,
};
use criterion::{black_box, criterion_group, criterion_main, Criterion, Throughput};
use futures::{StreamExt, TryStreamExt};
use tantivy::tokenizer::NgramTokenizer;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "chroma-benchmark-datasets"
name = "chroma-test"
version = "0.1.0"
edition = "2021"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
pub mod types;
pub mod util;

pub mod ms_marco_queries;
pub mod scidocs;
pub mod wikipedia;
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use std::{collections::HashMap, path::PathBuf};

use crate::{
use super::{
types::{QueryDataset, Record, RecordDataset},
util::get_or_populate_cached_dataset_file,
};
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use std::{collections::HashMap, path::PathBuf};

use crate::{
use super::{
types::{Record, RecordDataset},
util::get_or_populate_cached_dataset_file,
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ use tantivy::{
use tokio::io::AsyncWriteExt;
use tokio_stream::{Stream, StreamExt};

use crate::util::{get_dir_for_persistent_dataset_files, get_or_populate_cached_dataset_file};
use super::util::{get_dir_for_persistent_dataset_files, get_or_populate_cached_dataset_file};

#[derive(Debug, Clone)]
pub struct Record {
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use tokio::{fs::File, io::AsyncBufReadExt};
use tokio_stream::wrappers::LinesStream;
use tokio_util::io::StreamReader;

use crate::{
use super::{
types::{Record, RecordDataset},
util::get_or_populate_cached_dataset_file,
};
Expand Down
1 change: 1 addition & 0 deletions rust/test/src/lib.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pub mod datasets;
Loading