mirror of
https://github.com/perstarkse/minne.git
synced 2026-04-26 18:58:29 +02:00
benchmarks: v1
Benchmarking ingestion, retrieval precision and performance
This commit is contained in:
27
eval/src/slice.rs
Normal file
27
eval/src/slice.rs
Normal file
@@ -0,0 +1,27 @@
|
||||
use crate::slices::SliceConfig as CoreSliceConfig;
|
||||
|
||||
pub use crate::slices::*;
|
||||
|
||||
use crate::args::Config;
|
||||
|
||||
impl<'a> From<&'a Config> for CoreSliceConfig<'a> {
|
||||
fn from(config: &'a Config) -> Self {
|
||||
slice_config_with_limit(config, None)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn slice_config_with_limit<'a>(
|
||||
config: &'a Config,
|
||||
limit_override: Option<usize>,
|
||||
) -> CoreSliceConfig<'a> {
|
||||
CoreSliceConfig {
|
||||
cache_dir: config.cache_dir.as_path(),
|
||||
force_convert: config.force_convert,
|
||||
explicit_slice: config.slice.as_deref(),
|
||||
limit: limit_override.or(config.limit),
|
||||
corpus_limit: config.corpus_limit,
|
||||
slice_seed: config.slice_seed,
|
||||
llm_mode: config.llm_mode,
|
||||
negative_multiplier: config.negative_multiplier,
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user