Skip to main content

validate_embedding_batch

Function validate_embedding_batch 

Source
pub fn validate_embedding_batch<C>(
    rows: Vec<EmbeddingBatchRow>,
    eligible_nodes: &BTreeSet<[u8; 16]>,
    dimension: usize,
    normalization: EmbeddingNormalization,
    limits: VectorStoreLimits,
    checkpoint: C,
) -> Result<ValidatedEmbeddingBatch, SearchArtifactError>
Expand description

Validate and canonicalize one complete embedding-space batch.

eligible_nodes is the resolved source projection for this generation. The returned batch covers it exactly: every row must be eligible and every eligible UUID must have one row. checkpoint is called before validation, once per row, and once per digest row so cancellation never returns a partial validated value.

ยงErrors

Rejects invalid dimensions/vectors, duplicate or ineligible UUIDs, incomplete coverage, configured resource exhaustion, and cancellation.