Skip to content

Conversation

@aniketpalu
Copy link
Contributor

What this PR does / why we need it:

Problem

  • get_historical_features() with start_date/end_date parameters (no entity_df) works in local mode but fails in remote mode with:
    • EntityTimestampInferenceException: Please provide an entity_df with a column named event_timestamp

Root Cause

  • Remote client sends mock table {"key": "mock_key"} when entity_df is None
  • Server treats mock table as valid entity_df, which lacks event_timestamp column
  • Server doesn't forward start_date/end_date to underlying offline store

Changes

  • Client (remote.py):
    • Handle None entity_df in _create_retrieval_metadata() and _get_entity_schema()
  • Server (offline_server.py):
    • Detect and discard mock tables (single 'key' column)
    • Create minimal entity_df with event_timestamp from start_date/end_date
    • Forward start_date/end_date kwargs to underlying offline store
    • Use pd.to_datetime() and utils.make_tzaware() for proper timestamp types

Which issue(s) this PR fixes:

Misc

Copy link
Member

@ntkathole ntkathole left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! @aniketpalu can you please rebase to resolve conflicts ?

Copy link
Contributor

@jyejare jyejare left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Handle empty entity_df in offline server.

datetime.fromisoformat(command["start_date"])
)
end_date = utils.make_tzaware(datetime.fromisoformat(command["end_date"]))
entity_df = pd.DataFrame(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should not need to create dummy entity_df at all. We should handle empty(entity_df=None) entity_df for and in offline_store.get_historical_features which we are returning in this function.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are right, its not needed to create mock dataframe with timestamps, just had to make sure that empty_df is being passed.

@aniketpalu aniketpalu requested a review from jyejare November 3, 2025 11:11
@ntkathole ntkathole merged commit ad32756 into feast-dev:master Nov 3, 2025
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants