Skip to content

Commit

Permalink
feat: Adding registry cache support for get_on_demand_feature_view (#…
Browse files Browse the repository at this point in the history
…4572)

Signed-off-by: Francisco Javier Arceo <farceo@redhat.com>
  • Loading branch information
franciscojavierarceo authored Sep 25, 2024
1 parent 626c94f commit 354c059
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions sdk/python/feast/feature_store.py
Original file line number Diff line number Diff line change
Expand Up @@ -492,20 +492,24 @@ def _get_stream_feature_view(
stream_feature_view.entities = []
return stream_feature_view

def get_on_demand_feature_view(self, name: str) -> OnDemandFeatureView:
def get_on_demand_feature_view(
self, name: str, allow_registry_cache: bool = False
) -> OnDemandFeatureView:
"""
Retrieves a feature view.
Args:
name: Name of feature view.
allow_registry_cache: (Optional) Whether to allow returning this entity from a cached registry
Returns:
The specified feature view.
Raises:
FeatureViewNotFoundException: The feature view could not be found.
"""
return self._registry.get_on_demand_feature_view(name, self.project)
return self._registry.get_on_demand_feature_view(
name, self.project, allow_cache=allow_registry_cache
)

def get_data_source(self, name: str) -> DataSource:
"""
Expand Down

0 comments on commit 354c059

Please sign in to comment.