-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Add support for Feature Transformation on Writes for On Demand Feature Views #4376
Comments
I was actually thinking the other way around. If we manage to figure out how to use precomputed values only for identical inputs (plus I'm assuming that transformation function itself is deterministic), do we need a A couple of other points:
|
We could use an idempotency key for this, this was something we had planned to add in my last job for this exact use case.
Yeah, implementing
Agreed. |
I think interface itself is pretty much stable at this point, so in that sense I agree. Still, from the overall ux perspective, there are still known limitations depending on the use case:
|
That's a good point. I think adding Python offline is the only other necessary item. Substrait/ibis is broader scope and not as used by the community yet. |
The problem
As discussed in #4365, we should add the ability to write an On Demand Feature View (ODFV) to store the output of the calculation.
The solution
The ideal solution would require a boolean to the ODFV decorator as metadata to control the write behavior and another boolean in the
get_online_features
method to allow for users to force features to be recomputed.The writes would be done by calling
push()
orwrite_to_online_store()
with the underlying raw data (inputs) and storing the transformed feature values (outputs) into the online store. The ODFV would be called before executing the writes.The change for the ODFV definition would be:
And the change for the
get_online_features
call would be:Again the
write_to_online_store: bool
parameter would dictate whether this ODFV would write to the online store and theforce_compute: bool
would dictate whether the ODFV would always recalculate the features. There's an argument to be made that we could skip thewrite_to_online_store
in the FeatureView declaration but this metadata would be useful to have in the registry for users.The write call would be the standard:
Alternatives
We discussed creating a different feature view for this behavior altogether but using the existing ODFV benefits from reusing a lot of existing code and documentation. Moreover, the industry has adopted this language so adding on top of the language feels more natural than adding entirely new language.
Additional context
After the implementation it would be ideal to add this as an example in the local Credit Scoring tutorial.
The text was updated successfully, but these errors were encountered: