triplets 0.15.0-alpha

Composable data sampling primitives for deterministic multi-source ML/AI training-data orchestration.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use crate::config::ChunkingStrategy;
use crate::data::{DataRecord, RecordChunk, RecordSection};

/// Pluggable algorithm for materializing chunks from a record section.
pub trait ChunkingAlgorithm: Send + Sync {
    /// Produce candidate chunks for one section of a record.
    fn materialize(
        &self,
        strategy: &ChunkingStrategy,
        record: &DataRecord,
        section_idx: usize,
        section: &RecordSection,
    ) -> Vec<RecordChunk>;
}