Forecast from what the system actually knew
Separate observation, publication, ingestion, and usable feature time when reconstructing historical information.
On this page
The question for today
What you’ll understand
- Distinguish the timestamps that determine historical eligibility.
- Reconstruct a revised observation at an earlier decision time.
- Design an audit record for a forecast information set.
A capacity planner predicts tomorrow’s accelerator demand from hourly job counts. A count describes the hour ending at 10:00, arrives at 10:07, and passes validation at 10:09. A correction appears at noon. Which value belongs in a forecast issued at 10:05? None of those versions was usable then. Sorting today’s clean table by observation timestamp silently gives the historical model information from its future. The engineering task is to reconstruct the actual information boundary, including delays and revisions, before asking whether a forecasting algorithm is accurate.
Give each timestamp one job
Observation time identifies the period or event being measured. Publication time records when a provider released a value. Ingestion time records receipt inside your infrastructure, while usable time records when validation and feature materialization made that version available to the forecasting path. These can differ substantially. A forecast cutoff must be compared with the timestamp governing the actual serving contract, rather than whichever timestamp is easiest to query. A source publication time alone does not prove internal availability.
Store a logical observation key together with version identity and usable time. A correction should create another version rather than overwrite the only evidence of what the model previously saw. For a historical query, first exclude versions unavailable at the decision cutoff, then choose the winning eligible version using a deterministic rule. A tie needs an explicit sequence or revision number. Keep deletion and invalidation records because removing a bad observation also changes the historical information set.
Historical joins need historical versions
An event-time join can prevent a measurement from being joined before its observation period and still leak a revision published later. The stronger replay combines the event-time relationship with usable-version eligibility. Feast documents point-in-time historical joins around entity timestamps and feature event timestamps; that mechanism should not be assumed to recover a separate internal availability history unless that history is actually represented. Test the query with a deliberately late correction, not only with neatly ordered events.
The St. Louis Fed’s real-time periods provide a concrete example of data vintages: the value known at a past date can differ from today’s revised value for the same observation date. Apply that distinction to infrastructure telemetry, business aggregates, and external predictors. A backfilled table may describe the past more completely without describing what an online predictor could have known. Preserve both views when they serve different purposes, and label the evaluation’s vintage policy explicitly.
Make the boundary reproducible
Record the forecast issue time, feature snapshot identity, source revision IDs, model version, and transformation version. If a feature pipeline runs every five minutes, distinguish the requested cutoff from its last completed materialization. A request at 10:10 may consume a snapshot completed at 10:08. Log that snapshot instead of claiming all data through 10:10 was used. This makes an apparent model regression diagnosable as stale inputs, changed transformations, or an actual change in predictive behavior.
Future calendar information is a useful exception to a simplistic rule that every feature timestamp must precede the target. Tomorrow’s weekday is knowable today; tomorrow’s actual queue length is not. Planned maintenance is usable only as the plan known at issue time, with later schedule changes preserved as new versions. Validate eligibility by knowledge time and feature meaning. Such checks let a model use legitimate future-known predictors while excluding observations that merely acquired old event timestamps during backfill.
Work it through
Replay an hourly count before its correction
An hourly count ending at 09:00 is 120 jobs, usable at 09:08. Its corrected value is 135 jobs, usable at 11:00. The 10:00 count is 150 jobs, usable at 10:12. Evaluate information at issue times 09:05, 10:10, and 11:05. Assume no other observations exist.
At 09:05, both versions of the 09:00 count fail the usable-time cutoff. There is no eligible count, so a forecast must use its documented missing-history fallback rather than 120 or 135.
At 10:10, the original 09:00 value 120 is eligible. The correction is not, and the 10:00 value is still unavailable. The latest usable observation is therefore 70 minutes old.
At 11:05, the corrected 09:00 value is 135 and the 10:00 value is 150. Both keys exist in the snapshot; the newest observation time is 10:00, giving an age of 65 minutes.
Observation ordering and usable-version ordering answer different questions. The replay preserves both, so the corrected old value never leaks into the 10:10 forecast.
The living notebook
Explore the model
Interactive lab · queue
A processing backlog can delay usable data
Reset, set Arrival rate λ to 2 and Service rate μ to 3. Predict backlog 4 initially and 3 after two Steps, when t=1 s. Reset, explicitly set λ=4 and μ=3, then take two Steps: predict backlog 5. This fluid count model illustrates processing pressure; it does not compute observation age or a real feature pipeline’s latency. Changing controls retains elapsed time, so Reset precedes each fresh comparison.
- Fluid backlog
- 4
- Net rate · λ − μ
- −1 /s
- M/M/1 mean residence
- 1 s
Fluid backlog starts at 4 and follows max(0, 4 + (λ − μ)t). The separate M/M/1 residence-time formula assumes Poisson arrivals, exponential service and λ < μ. Parameter changes pause playback and recompute the model at the current elapsed time. Reset restores both parameters and returns time to zero. Playback starts paused. Adjust either parameter, then choose Play or Step.
Look forBacklog can change data availability even when observation timestamps remain unchanged.
Pause & reason
Check your understanding
Your turn
Try it yourself
A measurement for 14:00 is published at 14:03, ingested at 14:04, and materialized at 14:06. Can a forecast issued at 14:05 use it? What is its usable delay and its observation age at 14:10?
Take a moment to make a prediction or work it out on paper. Open a hint when you need one.
Give me a hint
Use materialization as the declared serving boundary, and subtract the observation timestamp separately.
Compare with the solution
It cannot be used at 14:05 because 14:06 is later than the cutoff. Usable delay is 6 minutes; observation age at 14:10 is 10 minutes if this remains the latest usable measurement. Source publication three minutes earlier does not establish availability in this forecasting path.
Keep the idea
Take it with you
- Separate what a value describes from when its version becomes usable.
- Preserve revision history to replay historical information sets.
- Future-known covariates require a knowledge-time contract.
Read further
Original sources and deeper explanations to follow at your own pace.
Optional progress, saved in this browser when available. Revisit any lesson at any time.
Lesson not marked complete.