feast-dev / feast

The Open Source Feature Store for Machine Learning
https://feast.dev
Apache License 2.0
5.63k stars 1k forks source link

Feature View TTL not Make Sense #3435

Open mansoorsyed11 opened 1 year ago

mansoorsyed11 commented 1 year ago

Expected Behavior

Note 1 = ttl=timedelta(days=1), need to get day 1 data or one-day data but its gives total data.

Note 2 = when we are not mentioning any minutes in the time stamp of our original data source if give minutes in feast sdk data source code it should give 0 data but it's giving again total data.

Note 3 = when we are mentioned some minutes in the original data source it's giving every data that matches that minutes we didn't understand how exactly this TTL is working.

Current Behavior

Not giving according to TTL Time Stamp as given in expected behavior notes

Steps to reproduce

Specifications

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

tobby-lie commented 1 year ago

I believe I discovered bug related to Note 1:

The MULTIPLE_FEATURE_VIEW_POINT_IN_TIME_JOIN sql query forSnowflakeOfflineStore (my use-case) seems to be using TTL for two things:

  1. If there is a TTL for the current feature_view, also keep the rows where the timestamp_field is higher the the one provided minus the TTL
  2. If there is a TTL for the current feature_view then filter out event_timestamps older than entity_timestamp - TTL

Seems like TTL is just the amount of time that is inspected for a group of features starting from their timestamp and looking back in time from there. Intuitively, I assumed TTL was more of an "expiration date" where, after an elapsed amount of time from a timestamp, data would no longer be accessible via feast, it seems this is not the case currently.

stale[bot] commented 8 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.