From ee1c2e20ac50057c13ae7725066c582c67342647 Mon Sep 17 00:00:00 2001 From: Felix Wang Date: Tue, 30 Nov 2021 11:14:40 -0800 Subject: [PATCH] Do not attempt to compute ODFVs when there are no ODFVs Signed-off-by: Felix Wang --- sdk/python/feast/infra/offline_stores/offline_store.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sdk/python/feast/infra/offline_stores/offline_store.py b/sdk/python/feast/infra/offline_stores/offline_store.py index 0ab1de6a13..04bf34e3e2 100644 --- a/sdk/python/feast/infra/offline_stores/offline_store.py +++ b/sdk/python/feast/infra/offline_stores/offline_store.py @@ -41,7 +41,7 @@ def on_demand_feature_views(self) -> Optional[List[OnDemandFeatureView]]: def to_df(self) -> pd.DataFrame: """Return dataset as Pandas DataFrame synchronously including on demand transforms""" features_df = self._to_df_internal() - if self.on_demand_feature_views is None: + if not self.on_demand_feature_views: return features_df # TODO(adchia): Fix requirement to specify dependent feature views in feature_refs @@ -63,7 +63,7 @@ def _to_arrow_internal(self) -> pyarrow.Table: def to_arrow(self) -> pyarrow.Table: """Return dataset as pyarrow Table synchronously""" - if self.on_demand_feature_views is None: + if not self.on_demand_feature_views: return self._to_arrow_internal() features_df = self._to_df_internal()