FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

fix: Support historical feature retrieval with start_date/end_date in RemoteOfflineStore by aniketpalu · Pull Request #5703 · feast-dev/feast · GitHub

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .py  (2) All 1 file type selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
11 changes: 10 additions & 1 deletion sdk/python/feast/infra/offline_stores/remote.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,16 @@ def get_table_column_names_and_types_from_data_source(
return zip(table.column("name").to_pylist(), table.column("type").to_pylist())


def _create_retrieval_metadata(feature_refs: List[str], entity_df: pd.DataFrame):
def _create_retrieval_metadata(
feature_refs: List[str], entity_df: Optional[pd.DataFrame] = None
):
if entity_df is None:
return RetrievalMetadata(
features=feature_refs,
keys=[], # No entity keys when no entity_df provided
min_event_timestamp=None,
max_event_timestamp=None,
)
entity_schema = _get_entity_schema(
entity_df=entity_df,
)
Expand Down
3 changes: 3 additions & 0 deletions sdk/python/feast/offline_server.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -431,6 +431,9 @@ def get_historical_features(self, command: dict, key: Optional[str] = None):
# Extract parameters from the internal flights dictionary
entity_df_value = self.flights[key]
entity_df = pa.Table.to_pandas(entity_df_value)
# Check if this is a mock/empty table (contains only 'key' column)
if len(entity_df.columns) == 1 and "key" in entity_df.columns:
entity_df = None

feature_view_names = command["feature_view_names"]
name_aliases = command["name_aliases"]
Expand Down
Loading

Back | FazBrowse Home | New Git URL