-
Notifications
You must be signed in to change notification settings - Fork 1.2k
fix: Do not pull ODFVs from offline store (for write_to_online_store=True) #5786
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
fix: Do not pull ODFVs from offline store (for write_to_online_store=True) #5786
Conversation
…ical Signed-off-by: lukas.valatka <lukas.valatka@cast.ai>
|
FAILED sdk/python/tests/unit/test_on_demand_python_transformation.py::TestOnDemandPythonTransformation::test_stored_writes - AssertionError: assert ['counter', '...put_datetime'] == ['conv_rate_p...put_datetime']
lots of unit tests failing. Will need to check :/ |
|
So maybe I misunderstood, but ODFVs should be queryable from offline store. They should either execute the transformation at query time or be precomputed and stored already. |
|
First, here's what the docs say: https://docs.feast.dev/reference/beta-on-demand-feature-view By setting write_to_online_store=True, transformations are applied during data ingestion, and the transformed features are stored in the online store. This can improve online feature retrieval performance by reducing computation during reads. Conversely, if write_to_online_store=False (the default if omitted), transformations are applied during feature retrieval. Here's my thinking and experience using this new feature in prod. You call ODFVs are precomputed and stored within the online store if @franciscojavierarceo Lastly: the logic I propose to change in the PR above within has nothing to do with offline stores, but rather with online stores - it seems flawed to call it in offline_store.get_historical_features sorry long text, but got to explain :D The test is missing Here's the gist. Hope it makes sense. |
Removed Cast.ai logo from the homepage.
Signed-off-by: lukas.valatka <lukas.valatka@cast.ai>
Signed-off-by: lukas.valatka <lukas.valatka@cast.ai>
Signed-off-by: lukas.valatka <lukas.valatka@cast.ai>
Signed-off-by: lukas.valatka <lukas.valatka@cast.ai>
…atures' of github.com:astronautas/feast into fix/materialized-odfv-not-working-for-get-historical-features
…nto fix/materialized-odfv-not-working-for-get-historical-features
| # on demand view to on demand view proto | ||
| on_demand_view_index: Dict[str, "OnDemandFeatureView"] = {} | ||
| for view in all_on_demand_feature_views: | ||
| if view.projection and not view.write_to_online_store: |
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.
we need projections IIRC in the materialization
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.
so if you want to avoid the transformation on get_historical_features then i would put that logic there.
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.
👍 I'll check and adjust.
Signed-off-by: lukas.valatka <lukas.valatka@cast.ai>
|
@franciscojavierarceo Closing PR. Will open up a related fix only targeting get_historical_features, need to re-think this. |
What this PR does / why we need it:
Expected Behavior
On-demand feature views (ODFVs) with write_to_online_store=True should be materialized to the online store, but they should never be queried from the offline store (ODFVs, no data for them in the offline store).
Current Behavior
ODFVs with write_to_online_store=True are being queried from offline stores. In the code here
, if an ODFV has the write_to_online_store flag set, it is treated as a regular feature view. As a result, it gets queried from the offline store.
However, ODFVs are not historical feature views and do not have any data in offline stores, so they should never be queried there.
As discussed with @franciscojavierarceo, we remove the special condition to treat these materialized ODFVs and treat them as regular ODFVs, when retrieving offline features.
Which issue(s) this PR fixes:
#5776
Misc