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

オープン
#6,307 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
25/100
issue の種類
機能追加
明瞭さ
明確に書かれている
活発さ
停滞
技術スタック
python

調査の方向性

FeatureStore.materialize() と materialize_incremental() のエントリーポイントから始め、リンクされている PR #6277 を確認してください。feature_store.yaml と CLI がマテリアライゼーションのオプションをどのように公開しているかを確認し、チャンク化がオプトインであり、両方のインターフェースで動作し、中断された実行の後も進捗を保持することを検証してください。

索引モデルが issue の本文から書いたものです。

説明

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

主要言語
Python
スター
7.4k
フォーク
1.5k
平均マージ
2日 6時間
マージ済み PR(30日)
107

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

feast-dev/feast のほかの issue

feast-dev/feast の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。