Feature Store: Reliable Features for Training and Inference
Definition
A feature store manages reusable machine-learning features and their retrieval for training and inference. It connects feature definitions, entity keys, timestamps, metadata, and storage rather than simply storing model files. An offline store supports historical datasets and point-in-time joins; an optional online store serves recent values at low latency. Feast provides an open-source approach, while Databricks integrates feature governance with Unity Catalog. It is not a vector search engine or a replacement for every transformation pipeline.
Why it matters for AI jobs
ML platform and applied-ML roles must turn experimental features into dependable production inputs. Feature store engineering demonstrates that you can prevent temporal leakage, reduce training-serving skew, reuse features across teams, and balance freshness against serving cost. A portfolio with tested historical joins, repeatable materialization, and measured lookup latency provides stronger evidence than a model notebook alone. This is especially useful for recommendation, fraud detection, and ranking workloads; not every LLM application needs a feature store.
Key concepts
- Entity and feature view: Define stable join keys, typed feature columns, ownership, and the data source; a feature view describes how related features are retrieved.
- Offline versus online: Historical storage supports training and batch scoring; online storage targets low-latency lookups. Feast online stores retain the latest values per entity, not full history.
- Point-in-time joins: Select values no later than each observation timestamp. Account separately for delayed availability and backfills; event time alone does not prove that a value was available in production.
- Materialization and freshness: Load computed features into online storage through batch materialization or push ingestion. Define freshness objectives, retry behavior, and stale-value handling.
- Training-serving skew: Keep feature definitions and preprocessing aligned across training and prediction, and test null handling, defaults, units, and schema changes.
- Governance and tool boundaries: Track access, owners, and lineage. Feast does not replace upstream raw-data processing; Databricks supports managed Feature Views as well as feature tables populated by your own pipelines.
- TTL and availability: Understand each backend's retention and lookup semantics. A historical lookup window is not automatically an online freshness guarantee.
Learning path
- Create an isolated Python environment and run the official Feast quickstart with local Parquet data and a SQLite online store. Register definitions with
feast applyand run the included workflow. - Build an entity dataframe with identifiers, observation timestamps, and labels. Use
get_historical_features; add tests for future values, missing keys, expired windows, and late corrections. - Materialize features and call
get_online_featuresfrom a small inference endpoint. Measure lookup latency and missing-value rates; compare online values with the expected latest records. - Add a scheduled refresh and a push-ingestion example. Test retries, duplicate writes, out-of-order events, stale values, and recovery after a failed refresh.
- Compare the same design with Databricks Feature Store documentation: explain when to use managed Feature Views versus feature tables, and document access control, lineage, freshness, and cost trade-offs.