cursus.processing.datasets.pipeline_datasets¶
- class PipelineDataset(*args, **kwargs)[source]¶
Bases:
DatasetCustom dataset for multimodal input supporting text, tabular, categorical, and Parquet/CSV/TSV file formats with per-column processing pipelines.
- fill_missing_value(**kwargs)[source]¶
Ensure all fields are numeric or categorical with default fill values.
- add_pipeline(field_name, processor_pipeline)[source]¶
Adds a processing pipeline for a specified field. The pipeline is built by composing Processors via the >> operator. For example, for the text field ‘dialogue’, you might have:
- pipeline = (HTMLNormalizerProcessor() >> EmojiRemoverProcessor() >>
TextNormalizationProcessor() >> DialogueSplitterProcessor() >> DialogueChunkerProcessor(tokenizer, max_tokens=512) >> TokenizationProcessor(tokenizer, add_special_tokens=True))
- which you then add via:
dataset.add_pipeline(“dialogue”, pipeline)