GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — feat: Pass requested On-Demand Feature Views to Provider `get_historical_features` by Shizoqua · Pull Request #5803 · feast-dev/feast

feat: Pass requested On-Demand Feature Views to Provider get_historical_features #5803

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Sign up for GitHub

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
Shizoqua wants to merge 6 commits into feast-dev:master
base: master
Loading
Loading
from Shizoqua:feat/pass-odfvs-to-provider

Uh oh!

There was an error while loading. Please reload this page.

Open

feat: Pass requested On-Demand Feature Views to Provider get_historical_features #5803

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
6 commits
Select commit Hold shift + click to select a range
4f03d48
feat: pass ODFVs to provider for historical retrieval
Shizoqua Dec 30, 2025
7dcf9bf
feat: pass requested ODFVs into provider.get_historical_features
Shizoqua Dec 31, 2025
f352fd6
chore: fix ruff lint in ODFV provider tests
Shizoqua Jan 1, 2026
05024d2
style: format ODFV provider test
Shizoqua Jan 12, 2026
970cd02
docs: add TODO for long-term historical retrieval API cleanup
Shizoqua Jan 22, 2026
65fb480
Merge branch 'master' into feat/pass-odfvs-to-provider
Shizoqua Mar 18, 2026
File filter
Filter by extension

Clear filters
Conversations
Failed to load comments.
Loading

Uh oh!

There was an error while loading. Please reload this page.

Jump to
Jump to file
Failed to load files.
Loading

Uh oh!

There was an error while loading. Please reload this page.

Diff view
Diff view

There are no files selected for viewing

8 changes: 4 additions & 4 deletions 8 sdk/python/feast/feature_store.py
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -1361,9 +1361,9 @@ def get_historical_features(
all_on_demand_feature_views,
) = utils._get_feature_views_to_use(self.registry, self.project, features)

# TODO(achal): _group_feature_refs returns the on demand feature views, but it's not passed into the provider.
# This is a weird interface quirk - we should revisit the `get_historical_features` to
# pass in the on demand feature views as well.
# TODO: This is an interim API change. We should revisit the Provider/OfflineStore
# historical retrieval interface to avoid ad-hoc argument additions (e.g. passing ODFVs
# separately) and define a clearer long-term contract.

# Deliberately disable writing to online store for ODFVs during historical retrieval
# since it's not applicable in this context.
Expand All @@ -1374,7 +1374,6 @@ def get_historical_features(

for odfv in all_on_demand_feature_views:
odfv.write_to_online_store = False

fvs, odfvs = utils._group_feature_refs(
_feature_refs,
all_feature_views,
Expand Down Expand Up @@ -1409,6 +1408,7 @@ def get_historical_features(
job = provider.get_historical_features(
self.config,
feature_views,
on_demand_feature_views,
_feature_refs,
entity_df,
self.registry,
Expand Down
2 changes: 2 additions & 0 deletions 2 sdk/python/feast/infra/passthrough_provider.py
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -465,13 +465,15 @@ def get_historical_features(
self,
config: RepoConfig,
feature_views: List[Union[FeatureView, OnDemandFeatureView]],
Comment thread
Shizoqua marked this conversation as resolved.
Resolved

Uh oh!

There was an error while loading. Please reload this page.

on_demand_feature_views: List[OnDemandFeatureView],
feature_refs: List[str],
entity_df: Optional[Union[pd.DataFrame, str]],
registry: BaseRegistry,
project: str,
full_feature_names: bool,
**kwargs,
) -> RetrievalJob:
del on_demand_feature_views
job = self.offline_store.get_historical_features(
config=config,
feature_views=feature_views,
Expand Down
2 changes: 2 additions & 0 deletions 2 sdk/python/feast/infra/provider.py
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,7 @@ def get_historical_features(
self,
config: RepoConfig,
feature_views: List[Union[FeatureView, OnDemandFeatureView]],
on_demand_feature_views: List[OnDemandFeatureView],
feature_refs: List[str],
entity_df: Optional[Union[pd.DataFrame, str]],
registry: BaseRegistry,
Expand All @@ -263,6 +264,7 @@ def get_historical_features(
Args:
config: The config for the current feature store.
feature_views: A list containing all feature views that are referenced in the entity rows.
on_demand_feature_views: The on demand feature views requested as part of the retrieval.
feature_refs: The features to be retrieved.
entity_df: A collection of rows containing all entity columns on which features need to be joined,
as well as the timestamp column used for point-in-time joins. Either a pandas dataframe can be
Expand Down
3 changes: 3 additions & 0 deletions 3 sdk/python/tests/foo_provider.py
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
ProviderAsyncMethods,
SupportedAsyncMethods,
)
from feast.on_demand_feature_view import OnDemandFeatureView
from feast.online_response import OnlineResponse
from feast.protos.feast.types.EntityKey_pb2 import EntityKey as EntityKeyProto
from feast.protos.feast.types.Value_pb2 import RepeatedValue
Expand Down Expand Up @@ -98,12 +99,14 @@ def get_historical_features(
self,
config: RepoConfig,
feature_views: List[FeatureView],
on_demand_feature_views: List[OnDemandFeatureView],
feature_refs: List[str],
entity_df: Union[pandas.DataFrame, str],
registry: BaseRegistry,
project: str,
full_feature_names: bool = False,
) -> RetrievalJob:
del on_demand_feature_views
return RetrievalJob()

def online_read(
Expand Down
63 changes: 63 additions & 0 deletions 63 sdk/python/tests/unit/test_feature_store_passes_odfvs_to_provider.py
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
from types import SimpleNamespace

from feast.feature_store import FeatureStore
from feast.infra.offline_stores.offline_store import RetrievalJob


class _CapturingProvider:
def __init__(self):
self.captured_on_demand_feature_views = None

def get_historical_features(
self,
config,
feature_views,
on_demand_feature_views,
feature_refs,
entity_df,
registry,
project,
full_feature_names,
**kwargs,
):
self.captured_on_demand_feature_views = on_demand_feature_views
return RetrievalJob()


def test_feature_store_passes_on_demand_feature_views_to_provider(monkeypatch):
provider = _CapturingProvider()

store = FeatureStore.__new__(FeatureStore)
store.config = SimpleNamespace(project="test_project", coerce_tz_aware=False)
store._registry = object()
store._get_provider = lambda: provider

fv = object()
odfv = object()

monkeypatch.setattr(
"feast.utils._get_features",
lambda registry, project, features, allow_cache=False: ["odfv:feat"],
)
monkeypatch.setattr(
"feast.utils._get_feature_views_to_use",
lambda registry, project, features, allow_cache=False, hide_dummy_entity=True: (
[fv],
[odfv],
),
)
monkeypatch.setattr(
"feast.utils._group_feature_refs",
lambda feature_refs, feature_views, on_demand_feature_views: (
[(fv, [])],
[(odfv, [])],
),
)
monkeypatch.setattr(
"feast.utils._validate_feature_refs",
lambda *args, **kwargs: None,
)

store.get_historical_features(entity_df="SELECT 1", features=["odfv:feat"])

assert provider.captured_on_demand_feature_views == [odfv]
Loading
Oops, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Add this suggestion to a batch that can be applied as a single commit. This suggestion is invalid because no changes were made to the code. Suggestions cannot be applied while the pull request is closed. Suggestions cannot be applied while viewing a subset of changes. Only one suggestion per line can be applied in a batch. Add this suggestion to a batch that can be applied as a single commit. Applying suggestions on deleted lines is not supported. You must change the existing code in this line in order to create a valid suggestion. Outdated suggestions cannot be applied. This suggestion has been applied or marked resolved. Suggestions cannot be applied from pending reviews. Suggestions cannot be applied on multi-line comments. Suggestions cannot be applied while the pull request is queued to merge. Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.