GeezerVison is showing github.com — feat: Adding write capability to online store to on demand feature views by franciscojavierarceo · Pull Request #4585 · feast-dev/feast
Conversation
What this PR does / why we need it:
This PR adds the ability to write On Demand Feature Views to the online store. At the moment, On Demand Feature Views are limited to transformations on reads. This allows for transformations to happen on writes using the Feast feature server (i.e., when store.push() or store.write_to_online_store() are called).
On Demand Feature Views are designed to apply transformations over existing features dynamically. However, limiting these transformations to read time can be inefficient, especially for complex computations. Enabling write-time transformations allows for these computations to be done once during data ingestion, reducing read-time latency.
Why do we need this?
- Performance Improvement: By performing transformations at write time, we reduce the computational load during reads, leading to faster online inference and improved scalability.
- Unified Transformation Workflow: This change is a crucial step toward unifying feature transformations and feature views, streamlining the feature engineering process as discussed in issue #4584.
- Flexibility: It provides users with more flexibility in how and when feature transformations are applied, catering to a broader range of use cases.
Summary of changes
Updated the following:
DataFrameSerializationError to handle Any input in sdk/python/feast/errors.py
- Types to include
BaseFeatureView in sdk/python/feast/feature_service.py
sdk/python/feast/feature_store.py to run update_feature_views_with_inferred_features_and_entities for ODFVs as well
apply_diffs in sdk/python/feast/feature_store.py to include ODFVs for all ODFVs with write_to_online_store
- Also incorporated updating data sources
_infer_on_demand_features_and_entities in sdk/python/feast/inference.py to behave as expected
- Types in:
sdk/python/feast/infra/materialization/aws_lambda/lambda_engine.py
sdk/python/feast/infra/materialization/batch_materialization_engine.py
sdk/python/feast/infra/materialization/contrib/spark/spark_materialization_engine.py
sdk/python/feast/infra/materialization/kubernetes/k8s_materialization_engine.py
sdk/python/feast/infra/materialization/local_engine.py
sdk/python/feast/infra/materialization/snowflake_engine.py
sdk/python/feast/infra/online_stores/online_store.py
sdk/python/feast/infra/passthrough_provider.py
sdk/python/feast/infra/provider.py
ingest_df in sdk/python/feast/infra/passthrough_provider.py to incorporate OnDemandFeatureView
sdk/python/feast/type_map.py to incorporate List[float] (float = double)
sdk/python/feast/types.py to implement _utc_now
_convert_arrow_to_proto in sdk/python/feast/utils.py to include BaseFeatureView and OnDemandFeatureView to
- Implement
_convert_arrow_odfv_to_proto
- Update
_prepare_entities_to_read_from_online_store to handle ODFVs
sdk/python/tests/integration/materialization/test_snowflake.py to be more explicit about the expected return value
sdk/python/tests/unit/local_feast_tests/test_local_feature_store.py to
- Fix typo in
test_apply_dummy_entity_and_feature_view_columns
- Explicitly test behavior of
FeatureView.entity_columns() class instantiation before and after FeatureStore.apply() with and without entities (the behavior is different)
sdk/python/tests/unit/online_store/test_online_writes.py to also include test for expected values of FeatureView.entity_columns()
sdk/python/tests/unit/test_on_demand_feature_view.py to add test_on_demand_feature_view_writes_protos and test_on_demand_feature_view_stored_writes functions to validate and demonstrate expected behavior
sdk/python/tests/unit/test_on_demand_python_transformation.py to add python_stored_writes_feature_view ODFV and test_stored_writes test to verify expected behavior
- Implemented
TestOnDemandTransformationsWithWrites class to further test the behavior end to end
Which issue(s) this PR fixes:
#4376
Misc
Documentation is added in this PR #4607
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
shuchu reacted with thumbs up emoji
… the entities correct when storing writes. just checking in progress
Signed-off-by: Francisco Javier Arceo <[email protected]>
…liteOnlineStore.update() method
Signed-off-by: Francisco Javier Arceo <[email protected]>
…tity_columns return value (#4603)
chore: updated snowflake test to be more explicit about post apply entity_column return value
Signed-off-by: Francisco Javier Arceo <[email protected]>
This was referenced Oct 6, 2024
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.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
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.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
|