Skip to content

Extract ML service feature pipeline into standalone ETL module #577

Description

@Smartdevs17

Context

ML feature engineering logic is embedded in the FastAPI inference service, mixing data transformation with model serving and making both hard to maintain.

Current Limitation/Problem

Feature computation runs synchronously during inference requests, adding 200-500ms latency. Feature transformation code is untested and versioned poorly.

Expected Outcome

Standalone ETL pipeline that pre-computes features into a feature store, with versioned transformations, backfill capability, and feature drift monitoring.

Acceptance Criteria

  • Feature pipeline extracted to services/feature-pipeline/ as a separate Python service
  • Feature store: Redis-compatible store with TTL-based expiration for real-time features
  • Versioned transformations: each feature set has a hash, cache invalidation on change
  • Batch computation: hourly cron for real-time features, daily cron for historical aggregates
  • Backfill command: recompute features for a date range with progress tracking
  • Inference API reads from feature store; on cache miss, computes online and writes to store
  • Feature drift detection: Kolmogorov-Smirnov test comparing current vs. reference distribution
  • Edge case: feature store unavailable (all features computed online with store update)

Technical Scope

  • services/feature-pipeline/ - new ETL service (Python/FastAPI)
  • services/feature-pipeline/features/ - transformation modules (one per feature group)
  • ml-service/ - remove embedded feature computation, replace with feature store reads
  • docker-compose.yml - feature store (Redis) service
  • services/feature-pipeline/jobs/ - cron-based refresh with Airflow integration

Metadata

Metadata

Labels

200-points200 point issueStellar WaveIssues in the Stellar wave programdrips-waveIssues in the Drips Wave programhighHigh complexity issue

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions