Expand description
Source traits for synchronous and asynchronous data origins. Source trait - the extension point for data origins.
A [Source] produces [Sample]s from some origin (filesystem, network, database, etc.).
Community contributors add new sources by implementing this single trait.
Built-in sources include GlobSource,
MemorySource, and
DistributedSampler, with optional
feature-gated sources such as CSV and io_uring readers.
§Async Sources
For async data origins, implement [AsyncSource] and wrap with
Pipeline::from_async_source.
This runs the async source in a dedicated Tokio runtime without blocking
the pipeline’s worker threads.
Structs§
- Async
Iterator Adapter - Runs
AsyncSourceIteratorasynchronously block by block. - Async
ToSync Adapter - Adapts an
AsyncSourceinto a synchronousSourceby running a Tokio runtime.
Traits§
- Async
Source - Async-capable source of training data.
- Async
Source Iterator - Async iterator over samples from a source.
- Source
- A source of training data.
- Source
Iterator - Iterator over samples from a source.
Type Aliases§
- BoxFuture
- Boxed future used by async source extension traits.