Skip to content

Commit 354c059

Browse files
feat: Adding registry cache support for get_on_demand_feature_view (feast-dev#4572)
Signed-off-by: Francisco Javier Arceo <farceo@redhat.com>
1 parent 626c94f commit 354c059

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

sdk/python/feast/feature_store.py

+7-3
Original file line numberDiff line numberDiff line change
@@ -492,20 +492,24 @@ def _get_stream_feature_view(
492492
stream_feature_view.entities = []
493493
return stream_feature_view
494494

495-
def get_on_demand_feature_view(self, name: str) -> OnDemandFeatureView:
495+
def get_on_demand_feature_view(
496+
self, name: str, allow_registry_cache: bool = False
497+
) -> OnDemandFeatureView:
496498
"""
497499
Retrieves a feature view.
498500
499501
Args:
500502
name: Name of feature view.
501-
503+
allow_registry_cache: (Optional) Whether to allow returning this entity from a cached registry
502504
Returns:
503505
The specified feature view.
504506
505507
Raises:
506508
FeatureViewNotFoundException: The feature view could not be found.
507509
"""
508-
return self._registry.get_on_demand_feature_view(name, self.project)
510+
return self._registry.get_on_demand_feature_view(
511+
name, self.project, allow_cache=allow_registry_cache
512+
)
509513

510514
def get_data_source(self, name: str) -> DataSource:
511515
"""

0 commit comments

Comments
 (0)