Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
renaming param
Signed-off-by: Vitaly Sergeyev <vsergeyev@better.com>
  • Loading branch information
Vitaly Sergeyev committed Mar 4, 2022
commit 1370aed82a024e69c95f28a18d122c0e1fcd503e
8 changes: 4 additions & 4 deletions sdk/python/feast/online_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def __init__(self, online_response_proto: GetOnlineFeaturesResponse):
del result.event_timestamps[idx]
break

def to_dict(self, is_with_event_timestamps: bool = False) -> Dict[str, Any]:
def to_dict(self, include_event_timestamps: bool = False) -> Dict[str, Any]:
"""
Converts GetOnlineFeaturesResponse features into a dictionary form.

Expand All @@ -63,7 +63,7 @@ def to_dict(self, is_with_event_timestamps: bool = False) -> Dict[str, Any]:
else:
response[feature_ref].append(native_type_value)

if is_with_event_timestamps:
if include_event_timestamps:
event_ts = result.event_timestamps[idx].seconds
timestamp_ref = feature_ref + TIMESTAMP_POSTFIX
if timestamp_ref not in response:
Expand All @@ -73,12 +73,12 @@ def to_dict(self, is_with_event_timestamps: bool = False) -> Dict[str, Any]:

return response

def to_df(self, is_with_event_timestamps: bool = False) -> pd.DataFrame:
def to_df(self, include_event_timestamps: bool = False) -> pd.DataFrame:
"""
Converts GetOnlineFeaturesResponse features into Panda dataframe form.

Args:
is_with_event_timestamps: bool Optionally include feature timestamps in the dataframe
"""

return pd.DataFrame(self.to_dict(is_with_event_timestamps))
return pd.DataFrame(self.to_dict(include_event_timestamps))