Overview
FEATSRV stacks Feast, Redis, PySpark, and FastAPI across five layers: temporal Parquet sources, feature store registry, online materialization, REST serving, and operator clients. FeatLock 1.0 surfaces that stack in a browser console and proxies authenticated JSON to the backend.
- Point-in-time correctness — SCD Type 2 as-of joins keyed by
event_timestamp. - Online Redis — sub-10 ms policy and claim feature lookups.
- Dual offline engines — Feast/Dask and PySpark with equivalence checks.
- Nimbus packs — intentional leakage traps for evaluation.
Authentication
Pass an API key with the x-api-key header. The same-origin proxy forwards the header to the FEATSRV FastAPI backend. When the backend is unreachable, the console falls back to Nimbus demo JSON under /investor-relations/research/point-in-time/data/.
curl -H "x-api-key: YOUR_KEY" \ https://www.data-t.uk/api/featlock/health
Same-origin proxy
Browser calls use /api/featlock/* on data-t.uk. The Next.js route forwards to the configured FEATLOCK_BACKEND_URL (default production FEATSRV host) and preserves method, query string, and JSON body.
| Client path | Upstream |
|---|---|
/api/featlock/health | GET /health |
/api/featlock/online/policy/{id} | GET /online/policy/{id} |
/api/featlock/pit-training | POST /pit-training |
Endpoints
| Method | Path | Role |
|---|---|---|
| GET | /api/featlock/health | Uptime and Redis / Feast dependency checks |
| GET | /api/featlock/online/policy/{id} | Real-time policy features from Redis |
| GET | /api/featlock/online/claim/{id} | Real-time claim features from Redis |
| POST | /api/featlock/offline | Batch offline feature materialization |
| POST | /api/featlock/pit-training | Point-in-time join on target entities / CSV |
| POST | /api/featlock/leakage-audit | Scan for temporal leakage traps |
| GET | /api/featlock/feature-importance | Importance rankings across actuarial models |
Online lookups
Online routes return key-value feature payloads for a policy or claim entity ID. Typical latency is under 10 ms when Redis is warm. The FeatLock console Online Lookups tab exercises these endpoints with demo fallbacks.
curl -H "x-api-key: YOUR_KEY" \ https://www.data-t.uk/api/featlock/online/policy/POL-1001
PIT training
POST /pit-training builds a leakage-free training frame: for each label row, features are retrieved as-of that row's event_timestamp. Use this before model fit so offline metrics match production scoring semantics.
Leakage audit
POST /leakage-audit flags rows where feature_timestamp is after event_timestamp, ranked by severity. Nimbus packs include mild and severe traps so teams can prove unguarded joins inflate AUC before going live.
Console tabs
- Overview — uptime, request volume, response-time distribution.
- Data lineage — Parquet → PIT store → Redis → model consumers.
- Risk & leakage — portfolio index and audit findings.
- Feature importance — underwriting, pricing, fraud rankings.
- Training & batch — PIT preview and offline join logs.
- Online lookups — interactive Redis policy/claim fetches.