Skip to content

Commit

Permalink
Do not attempt to compute ODFVs when there are no ODFVs
Browse files Browse the repository at this point in the history
Signed-off-by: Felix Wang <wangfelix98@gmail.com>
  • Loading branch information
felixwang9817 committed Nov 30, 2021
1 parent 54d0f3a commit ee1c2e2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sdk/python/feast/infra/offline_stores/offline_store.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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()
Expand Down

0 comments on commit ee1c2e2

Please sign in to comment.