Filters
How to search
  • Plain words find names, texts and examples.
  • "two words" finds the exact phrase.
  • --name or -x finds an option.
  • #word looks only inside commands.
  • @grep finds lessons and labs that use grep.
  • Filters: cat:network · in:labs · in:notes · level:rhcsa · ch:8 · root:yes. Put ! before a word to leave it out. OR between words means one of them.
  • ↑ ↓ to move · Enter to open · Esc to close · / to search

Data & MLOpsMixed 21 series

Inside a feature store

A feature store answers one question twice: the same feature, once for training and once for the next request. The layers that make that safe are boring on purpose.

Quick reference

Read it bottom to top: source to serving.

LayerWhat it doesTypical tech
Event logAppend-only events with an entity key and an event time.KAFKA / CDC
SourcesEvent stream, warehouse tables and partner feeds.STREAM / BATCH
TransformsVersioned definitions, tested on a sample before a backfill.SQL / PYTHON
Offline storePoint-in-time history for training, partitioned by date.PARQUET / ICEBERG
Online storeLow-latency values keyed by entity for the next request.KV / REDIS
ServingOne definition, two readers, and a freshness stamp.API / SDK

In one line: Same definition, two clocks. Offline for history, online for the next request; keep them one definition.

Check for skew:

join offline and online on user_id limit 100

Explained

Event log

Every event, append-only, with an entity key and an event time. If the event time is wrong, every window downstream is wrong, so validate it at the door.

Sources and transforms

Streams, warehouse tables and partner feeds become versioned definitions. A definition is code: reviewed, tested on a sample, and backfilled only after it passes.

Offline store

Point-in-time history for training. The join must use the feature value as it was at the label time, not as it is today, or the model learns from the future.

Online store

Low-latency values keyed by entity for serving. It is a cache with a contract, not a second source of truth.

Serving

One definition, two readers, and a freshness stamp on the response.

The honest caveat: a feature store adds a system to operate. If you have one model and one table, a well-tested join may be enough; the store earns its keep when several teams reuse the same definition.

The lesson: one definition, two clocks, and a skew test that runs every day.

Your turn: Which feature would break if offline and online disagreed?

More notes: Data & MLOps

Open in the notes app: search, filters, copy This note on GitHub