From 354c059e5475f9c3927d9180a421118507a22cf0 Mon Sep 17 00:00:00 2001 From: Francisco Arceo Date: Tue, 24 Sep 2024 23:31:14 -0400 Subject: [PATCH] feat: Adding registry cache support for get_on_demand_feature_view (#4572) Signed-off-by: Francisco Javier Arceo --- sdk/python/feast/feature_store.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/sdk/python/feast/feature_store.py b/sdk/python/feast/feature_store.py index ab2bc6cec2..52556eda15 100644 --- a/sdk/python/feast/feature_store.py +++ b/sdk/python/feast/feature_store.py @@ -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: """