How ai-forever/dataprocessingframework works
Main Components
a. Core Components:
• Dataset Reader System
• Connectors Layer (S3, Local)
• Processing Engine
• Filter System
• Pipeline Engine
• Transform System
• Validation System
b. Data Flow Components:
• Input Data Sources
• Data Format Handlers
• Processing Pipeline
• Output Handlers
┌─ Input Layer ─────────────────────────────────┐
• Local Files │
• S3 Storage │
• ┘
• ↓
┌─ Data Format Layer ──────────────────────────┐
• Files Format │
• Shards Format │
• Sharded Files Format │
• ┘
• ↓
┌─ Core Processing Layer ────────────────────────┐
• ┌─ Dataset Reader ─┐ ┌─ Processors ────────┐ │
• Files Processor │ │
• Shards Processor │ │
• ┘ │ - Sharded Processor │ │
• ┘│
• ┘
• ↓
┌─ Filter System Layer ─────────────────────────┐
• ┌─ Image Filters ─┐ ┌─ Video Filters ───────┐│
• NSFW │ │ - RAFT ││
• Aesthetic │ │ - Grounding GPT ││
• OCR │ │ - Video LLaVA ││
• ┘ └─────────────────────────┘│
• ┌─ Text Filters ──┐ ┌─ Audio Filters ───────┐│
• Language │ │ ││
• Regex │ │ ││
• ┘ └─────────────────────────┘│
• ┘
• ↓
┌─ Transform Layer ──────────────────────────────┐
• Image Resizing │
• Video FFmpeg Transforms │
• ┘
• ↓
┌─ Pipeline Layer ───────────────────────────────┐
• Filter Pipeline │
• Pipeline Stages │
• ┘
• ↓
┌─ Output Layer ────────────────────────────────┐
• Processed Dataset │
• Updated Metadata │
• ┘
Important Details
a. Supported Modalities:
• Text
• Image
• Video
• (Show their interconnections)
b. Configuration System:
• Dataset Config
• Sharded Config
• Files Config
c. Validation Layer:
• Format Validators
• Error Handlers
Additional Elements
• Version information
• Supported file systems (Local, S3)
• Parallel processing capabilities
• Error handling flow
Notes for Implementation
• Keep components modular and clearly separated
• Clear data flow paths
• Extensibility points
• Processing workers distribution
• Configuration injection points
Remember to add notes about:
• Multimodal dataset support
• Parallel processing capabilities
• Filter pipeline customization
• Storage system flexibility
• Transform system extensibility