-
Notifications
You must be signed in to change notification settings - Fork 1.2k
feat: Entity-less Offline Store historical features retrieval based on datatime range #5527
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Entity-less Offline Store historical features retrieval based on datatime range #5527
Conversation
9a60999 to
d510325
Compare
Signed-off-by: jyejare <jyejare@redhat.com>
Signed-off-by: jyejare <jyejare@redhat.com>
d510325 to
85f2126
Compare
Fixed linting and unit tests Signed-off-by: jyejare <jyejare@redhat.com>
cf3d3bd to
723f8ad
Compare
| if entity_df is None: | ||
| # Default to current time if end_date not provided | ||
| if end_date is None: | ||
| end_date = datetime.now(tz=timezone.utc) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
from feast.utils import _utc_now
_utc_now()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TBH I dont like one-line functions, which don't save even a one line of code :) We should completely avoid them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
generally this pattern is useful if for some reason things are changed (e.g., some libraries die). I'm not overly fond of it either but it was the choice the original authors made and I tend to prefer to respect original design.
check path https://github.com/feast-dev/feast/tree/master/sdk/python/feast/infra/offline_stores
|
|
@ntkathole I am not taking care of all Offline stores in this PR. This is a targetted PR for @itay1551 request in Issue #5474 , where uses Postgres. The rollout is required for all other offline stores but gradually, we dont need to handle that in this PR. Especially when the ask is very urgent from @itay1551 . |
✅ Compute Engine Compatibility AnalysisRegarding @ntkathole's question about compute engine changes - no additional compute engine modifications are needed for this PostgreSQL implementation. Here's why: 🏗️ Architecture Analysis:The
🎯 Current Support Status:
🔧 Key Insight: Indirect DelegationLocal and Spark compute engines actually delegate back to your offline store implementation: # In compute engines:
retrieval_job = offline_store.pull_all_from_table_or_query(
start_date=start_time, # ← Your changes work here!
end_date=end_time, # ← Your changes work here!
# ... other params
)🚀 Recommendation:Your PostgreSQL-first approach is architecturally sound. The base interface updates ( No blocking compute engine work required for this PR! 🎉 |
723f8ad to
199b632
Compare
|
@ntkathole All comments addressed:
|
ntkathole
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
franciscojavierarceo
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a couple of small nits that would be good to fix but otherwise this lgtm
199b632 to
23ca6a0
Compare
… FAQ update Signed-off-by: jyejare <jyejare@redhat.com>
23ca6a0 to
8ff71c0
Compare
…but based on datatime range (#5527) * Non entity based feature retrieval Signed-off-by: jyejare <jyejare@redhat.com> * Point in time joins and TTS based start date Signed-off-by: jyejare <jyejare@redhat.com> * Tests added for non empty retrieval , postgres only Fixed linting and unit tests Signed-off-by: jyejare <jyejare@redhat.com> * API, CLI changes for historical features retrieval without entity_df, FAQ update Signed-off-by: jyejare <jyejare@redhat.com> --------- Signed-off-by: jyejare <jyejare@redhat.com>
# [0.52.0](v0.51.0...v0.52.0) (2025-08-14) ### Bug Fixes * Correct entity value type mapping for aliased feature views ([#5492](#5492)) ([bdf20bb](bdf20bb)) * Correct namespace reference in remote Feast project setup for operator upgrade and previous version tests ([df391ec](df391ec)) * dell pydantic v1 ([1189512](1189512)) * Fixed the entity to on-demand feature view relationship ([1c59bba](1c59bba)) * Make transformers optional ([#5544](#5544)) ([a4eef38](a4eef38)) * Push Source inherits the timestamp fields from Data Source ([#5550](#5550)) ([b7ea5cc](b7ea5cc)) * Remove the devcontainer folder. ([a9815c2](a9815c2)) ### Features * Added API for discovering Feature Views by popular tags ([#5558](#5558)) ([2e5f564](2e5f564)) * Added filtering support for featureView and featureServices api ([#5552](#5552)) ([897b3f3](897b3f3)) * Added global search api and necessary unit tests ([#5532](#5532)) ([dd3061f](dd3061f)) * Added Ray Compute Engine and Ray Offline Store Support ([#5526](#5526)) ([72de088](72de088)) * Added recent visit logging api for registry server ([#5545](#5545)) ([2adcf2c](2adcf2c)) * **auth:** support client-credentials & static token for OIDC client auth ([fc44222](fc44222)) * **auth:** support client-credentials & static token for OIDC client auth ([795fc06](795fc06)) * Implement and enhance remote document retrieval functionality ([#5487](#5487)) ([d095b96](d095b96)) * Implemented consistent error handling ([7f10151](7f10151)) * Offline Store historical features retrieval without entity df, but based on datatime range ([#5527](#5527)) ([df942b9](df942b9))
What this PR does / why we need it:
Which issue(s) this PR fixes:
Fixes #5474
Misc
Now all folowing combinations just works out of the box:
Possible 1 (Returns data during the given timerange):
Possible 2 (Returns data during the end_date minus TTL time in feature view):
Possible 3 (Returns data from the start date to now time):
Possible 4 (Returns data during the TTL time in feature view to now time) :
Possible 5 (Existing way still works, for ODFV purpose):