Skip to main content

Module sampler

Module sampler 

Source
Expand description

Sampler implementations and public sampling API.

Structs§

BatchPrefetcher
Background prefetcher that fills a bounded queue with sample batches.
TripletSampler
Sampler that draws anchors from a single shared epoch cursor and then selects chunks from those records. Ingestion happens on demand when sampling.

Traits§

Sampler
Public sampling interface for pair, triplet, and text batch generation.

Functions§

chunk_weight
Public helper so callers (and examples) can compute the same chunk weighting the sampler uses.