You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: Adding documentation for On Demand Feature Transformations with writes (feast-dev#4607)
* Update beta-on-demand-feature-view.md
* updated docs
Signed-off-by: Francisco Javier Arceo <farceo@redhat.com>
* feat: Adding documentation for On Demand Feature Transformations with writes
Signed-off-by: Francisco Javier Arceo <farceo@redhat.com>
---------
Signed-off-by: Francisco Javier Arceo <farceo@redhat.com>
Copy file name to clipboardexpand all lines: docs/reference/beta-on-demand-feature-view.md
+69-7
Original file line number
Diff line number
Diff line change
@@ -4,20 +4,28 @@
4
4
5
5
## Overview
6
6
7
-
On demand feature views allows data scientists to use existing features and request time data (features only available
8
-
at request time) to transform and create new features at the time the data is read from the online store. Users define
9
-
python transformation logic which is executed in both historical retrieval and online retrieval paths.
7
+
On Demand Feature Views (ODFVs) allow data scientists to use existing features and request-time data (features only
8
+
available at request time) to transform and create new features. Users define Python transformation logic which is
9
+
executed during both historical retrieval and online retrieval. Additionally, ODFVs provide flexibility in
10
+
applying transformations either during data ingestion (at write time) or during feature retrieval (at read time),
11
+
controlled via the `write_to_online_store` parameter.
12
+
13
+
By setting `write_to_online_store=True`, transformations are applied during data ingestion, and the transformed
14
+
features are stored in the online store. This can improve online feature retrieval performance by reducing computation
15
+
during reads. Conversely, if `write_to_online_store=False` (the default if omitted), transformations are applied during
16
+
feature retrieval.
10
17
11
18
### Why use on demand feature views?
12
19
13
20
This enables data scientists to easily impact the online feature retrieval path. For example, a data scientist could
14
21
15
22
1. Call `get_historical_features` to generate a training dataframe
16
23
2. Iterate in notebook on feature engineering in Pandas/Python
17
-
3. Copy transformation logic into on demand feature views and commit to a dev branch of the feature repository
24
+
3. Copy transformation logic into ODFVs and commit to a development branch of the feature repository
18
25
4. Verify with `get_historical_features` (on a small dataset) that the transformation gives expected output over historical data
19
-
5. Verify with `get_online_features` on dev branch that the transformation correctly outputs online features
20
-
6. Submit a pull request to the staging / prod branches which impact production traffic
26
+
5. Decide whether to apply the transformation on writes or on reads by setting the `write_to_online_store` parameter accordingly.
27
+
6. Verify with `get_online_features` on dev branch that the transformation correctly outputs online features
28
+
7. Submit a pull request to the staging / prod branches which impact production traffic
21
29
22
30
## CLI
23
31
@@ -32,10 +40,18 @@ See [https://github.com/feast-dev/on-demand-feature-views-demo](https://github.c
32
40
33
41
### **Registering transformations**
34
42
35
-
On Demand Transformations support transformations using Pandas and native Python. Note, Native Python is much faster but not yet tested for offline retrieval.
43
+
On Demand Transformations support transformations using Pandas and native Python. Note, Native Python is much faster
44
+
but not yet tested for offline retrieval.
45
+
46
+
When defining an ODFV, you can control when the transformation is applied using the write_to_online_store parameter:
47
+
48
+
-`write_to_online_store=True`: The transformation is applied during data ingestion (on write), and the transformed features are stored in the online store.
49
+
-`write_to_online_store=False` (default when omitted): The transformation is applied during feature retrieval (on read).
36
50
37
51
We register `RequestSource` inputs and the transform in `on_demand_feature_view`:
0 commit comments