Wire ComputeEngine.get_historical_features() into the standard retrieval path to replace per-store BFV transformation duplication
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 35/100
- issue の種類
- リファクタリング
- 明瞭さ
- おおむね明確
- 活発さ
- 静か
- 技術スタック
- python, spark
調査の方向性
まず sdk/python/feast/infra/passthrough_provider.py と sdk/python/feast/infra/common/retrieval_task.py から始め、次に ComputeEngine.get_historical_features() と Ray および Spark の offline-store パスを比較します。HistoricalRetrievalTask が複数の view をサポートし、PIT の調整が compute engine に移され、provider が batch_engine 経由で取得をルーティングし、store ごとに重複している BFV 変換ロジックが削除されれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Background
Feast currently has two separate mechanisms for applying BatchFeatureView (BFV) transformations during historical feature retrieval:
-
Compute Engine DAG path (SparkComputeEngine.get_historical_features(), RayComputeEngine.get_historical_features()) — uses FeatureBuilder + ExecutionPlan with proper node sequencing: source → transform → filter → dedup. This path already handles BFV transformations correctly for both materialization and retrieval.
-
Offline Store path (passthrough_provider.get_historical_features() → offline_store.get_historical_features()) — the standard path invoked by FeatureStore.get_historical_features(). This path bypasses the compute engine entirely.
Because of this split, each offline store that wants BFV compute-on-read during historical retrieval must re-implement transformation detection and application logic independently:
- RayOfflineStore.get_historical_features() implements it via resolve_feature_view_source_with_fallback() + map_batches()
- PR #6357 adds a parallel implementation for SparkOfflineStore
This means transformation logic is duplicated across stores rather than living in the shared compute engine layer.
Root Cause
passthrough_provider.get_historical_features() always delegates to self.offline_store, never to self.batch_engine:
# sdk/python/feast/infra/passthrough_provider.py
def get_historical_features(self, config, feature_views, ...):
job = self.offline_store.get_historical_features(...) # batch_engine never called
return job
Note the contrast with materialization, which correctly routes through the engine:
jobs = self.batch_engine.materialize(registry, task)
Blocking Interface Mismatch
The compute engine cannot be directly substituted today because of a fundamental impedance mismatch:
- passthrough_provider.get_historical_features() receives feature_views: List[FeatureView] — multiple views for a single multi-view PIT join
- HistoricalRetrievalTask (the compute engine's input) has feature_view: Union[BatchFeatureView, StreamFeatureView] — a single view
# sdk/python/feast/infra/common/retrieval_task.py
@dataclass
class HistoricalRetrievalTask:
feature_view: Union[BatchFeatureView, StreamFeatureView] # singular
entity_df: Union[pd.DataFrame, str]
...
The compute engine is designed for per-view DAG execution. The PIT join logic that combines multiple views into one entity-aligned training dataset lives in each offline store's SQL template, not in the compute engine.
Proposed Solution
This is a multi-step refactor:
Step 1 — Extend HistoricalRetrievalTask to support multiple feature views:
@dataclass
class HistoricalRetrievalTask:
feature_views: List[Union[BatchFeatureView, FeatureView]] # plural
entity_df: Union[pd.DataFrame, str]
feature_refs: List[str]
Step 2 — Move PIT join coordination into ComputeEngine.get_historical_features():
The base ComputeEngine should orchestrate per-view DAG execution across all requested feature views and join the results back to entity_df — making the PIT join logic engine-owned rather than SQL-template-owned.
Step 3 — Wire the provider to call batch_engine for historical retrieval:
# passthrough_provider.py
def get_historical_features(self, config, feature_views, feature_refs, entity_df, ...):
task = HistoricalRetrievalTask(
feature_views=feature_views,
feature_refs=feature_refs,
entity_df=entity_df,
...
)
return self.batch_engine.get_historical_features(registry, task)
Step 4 — Retire per-store transformation logic:
Once the compute engine owns this path, the custom BFV transformation code in RayOfflineStore and SparkOfflineStore can be removed. All stores get transformation support for free through the engine's FeatureBuilder.
- 主要言語
- Python
- スター
- 7.4k
- フォーク
- 1.5k
- 平均マージ
- 2日 6時間
- マージ済み PR(30日)
- 107
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
feast-dev/feast のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
メンテナーはふだん 1 日以内に返信
-
BigQuery data quality monitoring fails: PRIMARY KEY placed outside the column list in monitoring table DDL対応中かも @liron-velocity が 50 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
get_online_features silently drops a join key value when it shares a name with an OnDemandFeatureView's RequestSource field対応中かも @OHMFOHS が 99 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
kind/bug priority/p2
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
feast-dev/feast#6778 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
feast-dev/feast の issue をすべて見る
似ている issue
-
accepted
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
future-agi/future-agi#6392 ·
メンテナーはふだん 1 日以内に返信
-
memmapped_arange ignores the start value and drops the last point above the memmap threshold対応中かも @prathameshfuke が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
StingraySoftware/HENDRICS#213 ·
-
Bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 2 日以内に返信
-
bot-triaged module: decompositions module: edge cases module: int overflow module: primTorch oncall: pt2 triage review
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信