IAiModelDataPipeline<T, TInput, TOutput>

Interfaces · AiDotNet.Configuration

Component that owns the data-pipeline configuration for an AI model build: preprocessing, postprocessing, data loading, data preparation, and augmentation. Extracted from AiModelBuilder as slice 1 of the audit-2026-05 phase-2a DI refactor (see docs/internal/audit-2026-05-phase2a-aimodelbuilder-refactor.md).

Known implementations: AiModelDataPipeline<T, TInput, TOutput>

How It Works

The interface exposes the configured state via get-only properties so that the rest of the build pipeline (AiModelBuilder.BuildAsync, the partial-class siblings, and any alternative composition root such as a future YAML loader) can consume it without depending on the god class. The Configure* methods mutate the underlying component instance and return void — the fluent chaining returns happen at the AiModelBuilder facade layer, not here, so the component stays usable from non-fluent contexts (e.g. tests).

This is the public extension seam: third-party packages or downstream consumers can implement IAiModelDataPipeline with custom defaults (e.g. a domain- specific preprocessing pipeline that ships with the audit-2026-05 federal-use SDK) and inject it into AiModelBuilder via the ctor parameter added in the same slice.

Properties

Property Summary
AugmentationConfig AugmentationConfig { get; } The configured (non-row-changing) augmentation configuration, or null if ConfigureAugmentation hasn’t been called.
DataPreparationPipeline<T> DataPreparationPipeline { get; } The configured row-changing data-preparation pipeline (outlier removal, SMOTE augmentation, etc.), or null if ConfigureDataPreparation hasn’t been called.
IDataLoader<T> DataLoader { get; } The configured data loader, or null if ConfigureDataLoader hasn’t been called.
PostprocessingPipeline<T, TOutput, TOutput> PostprocessingPipeline { get; } The configured postprocessing pipeline, or null if ConfigurePostprocessing hasn’t been called.
PreprocessingPipeline<T, TInput, TInput> PreprocessingPipeline { get; } The configured preprocessing pipeline, or null if ConfigurePreprocessing hasn’t been called.
int? PostprocessingFitMaxRows { get; } Optional cap on the number of training rows fed into the post-train pipeline-fit Predict call.

Methods

Method Summary
void AddPreprocessingStep(IDataTransformer<T, TInput, TInput> transformer, string name) Appends a transformer step to the preprocessing pipeline, creating the pipeline if none exists yet.
void ConfigureAugmentation(AugmentationConfig config) Strongly-typed overload of ConfigureAugmentation with IDE-discoverable typed Augmenter slot.
void ConfigureAugmentation(AugmentationConfig<T, TInput> config) Strongly-typed overload of ConfigureAugmentation with IDE-discoverable typed Augmenter slot.
void ConfigureDataLoader(IDataLoader<T> dataLoader) Configures the data loader.
void ConfigureDataPreparation(Action<DataPreparationPipeline<T>> pipelineBuilder) Configures the row-changing data-preparation pipeline.
void ConfigurePostprocessing(Action<PostprocessingPipeline<T, TOutput, TOutput>> pipelineBuilder) Configures postprocessing from a pre-built pipeline.
void ConfigurePostprocessing(IDataTransformer<T, TOutput, TOutput> transformer) Configures postprocessing from a pre-built pipeline.
void ConfigurePostprocessing(PostprocessingPipeline<T, TOutput, TOutput> pipeline) Configures postprocessing from a pre-built pipeline.
void ConfigurePreprocessing(Action<PreprocessingPipeline<T, TInput, TInput>> pipelineBuilder) Configures preprocessing from a pre-built pipeline.
void ConfigurePreprocessing(IDataTransformer<T, TInput, TInput> transformer) Configures preprocessing from a pre-built pipeline.
void ConfigurePreprocessing(PreprocessingPipeline<T, TInput, TInput> pipeline) Configures preprocessing from a pre-built pipeline.
void SetPostprocessingFitMaxRows(int? maxRows) Caps the number of training rows fed into the post-train pipeline-fit Predict.