bug: FeatureStore.materialize() OOM-crashes on large time ranges with no built-in workaround

Abierto
#6,307 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
25/100
Tipo de issue
Nueva funcionalidad
Claridad
Bien especificado
Estado de actividad
Estancado
Stack tecnológico
python

Línea de trabajo

Comienza por los puntos de entrada FeatureStore.materialize() y materialize_incremental() y, después, revisa el PR #6277 enlazado. Comprueba cómo feature_store.yaml y la CLI exponen las opciones de materialización, y verifica que el chunking sea opcional, funcione mediante ambas interfaces y conserve el progreso después de una ejecución interrumpida.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

kind/feature

Summary

FeatureStore.materialize() and FeatureStore.materialize_incremental() load the entire requested time range into memory in a single pass. On production deployments this causes out-of-memory (OOM) crashes that are silent, difficult to recover from, and currently require external orchestration to work around.

Steps to reproduce

from datetime import datetime, timedelta

fs.materialize(
    start_date=datetime(2026, 1, 1),
    end_date=datetime(2026, 3, 1),  # ~60-day window
)

With a high-frequency feature view (e.g. 10-minute ETL batches → ~8 640 rows/day per entity × many entities), a worker with ≤ 8 GB RAM will exhaust memory and crash with no informative error from Feast.

Root cause

Both materialize() and materialize_incremental() delegate to materialize_single_feature_view exactly once per feature view, passing the full [start, end] window. The underlying data source query materialises the entire range in one shot — there is no pagination, chunking, or streaming at the Feast SDK layer.

Impact

Scenario Effect
Multi-day / multi-week backfill Worker OOM crash
Sub-minute sensor data at scale Worker OOM crash
Large number of entities × long window Worker OOM crash
Crash recovery most_recent_end_time is not committed until the entire range succeeds, so a crash forces a full re-run

Current workaround

Users must implement their own loop outside Feast:

chunk = timedelta(hours=6)
cursor = start
while cursor < end:
    next_cursor = min(cursor + chunk, end)
    fs.materialize(cursor, next_cursor)
    cursor = next_cursor

This is error-prone, not integrated with materialize_incremental's watermark, and must be reimplemented by every affected user.

Expected behaviour

Feast should provide a native chunk_size option so users can cap peak memory usage without external orchestration. Chunking should:

  • Be opt-in and backward-compatible (default: no chunking).
  • Support a project-level default in feature_store.yaml under materialization.chunk_size.
  • Commit most_recent_end_time per chunk so a crash mid-run allows materialize_incremental to resume from the last committed chunk.
  • Be available via both the Python SDK and the CLI.

Related

A PR implementing the above is available for review: https://github.com/feast-dev/feast/pull/6277

Lenguaje dominante
Python
Estrellas
7.4k
Forks
1.5k
Merge medio
2 d 6 h
PR fusionados (30 d)
107

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de feast-dev/feast

Todos los issues de feast-dev/feast

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.