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
{{ message }}
Repository navigation
Commit a291a0f
Browse filesBrowse the repository at this point in the historyBrowse files
feat: Add online sequence configuration foundation (#6848)
* feat: Add online sequence configuration foundation
Signed-off-by: Chaitany Patel <patelchaitany93@gmail.com>
* fix: Preserve online config in batch view copies and registry diffs
BatchFeatureView.__copy__ now passes online_config, so version pinning
and unpromoted version snapshots keep the configuration.
Registry diffing now checks presence for online_config, so feast apply
detects switching between no config and OnlineConfig() with defaults.
Signed-off-by: Chaitany Patel <patelchaitany93@gmail.com>
* feat: Allow unlimited sequences in OnlineConfig
Sequence mode no longer requires max_length. Leaving max_length or
max_age unset (proto 0) now means no limit of that kind, so a sequence
with neither set keeps every event.
Signed-off-by: Chaitany Patel <patelchaitany93@gmail.com>
---------
Signed-off-by: Chaitany Patel <patelchaitany93@gmail.com>
Copy file name to clipboardExpand all lines: docs/getting-started/concepts/feature-view.md
+28Lines changed: 28 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,6 +26,7 @@ Feature views consist of:
26
26
* (optional) `owner`: the email of the primary maintainer
27
27
* (optional) `org`: the organizational unit that owns the feature view (e.g. `"ads"`, `"search"`); useful for grouping feature views by team or product area
28
28
* (optional) a TTL, which limits how far back Feast will look when generating historical datasets. During online retrieval, values older than the TTL are still returned, but their field status is `OUTSIDE_MAX_AGE` instead of `PRESENT`
29
+
* (optional) `online_config`, which declares online retention and write semantics
29
30
* (optional) `enable_validation=True`, which enables schema validation during materialization (see [Schema Validation](#schema-validation) below)
30
31
31
32
Feature views allow Feast to model your existing feature data in a consistent way in both an offline (training) and online (serving) environment. Feature views generally contain features that are properties of a specific object, in which case that object is defined as an entity and included in the feature view.
@@ -59,6 +60,33 @@ Feature views are used during
59
60
* Loading of feature values into an online store. Feature views determine the storage schema in the online store. Feature values can be loaded from batch sources or from [stream sources](../../reference/data-sources/push.md).
60
61
* Retrieval of features from the online store. Feature views provide the schema definition to Feast in order to look up features from the online store.
61
62
63
+
## Online retention configuration
64
+
65
+
`OnlineConfig` declares whether a feature view uses the current latest-value model or a sequence of historical values per entity. Sequence mode requires append writes. A maximum length and a maximum age are optional retention limits; leave both unset to keep an unlimited sequence.
66
+
67
+
```python
68
+
from datetime import timedelta
69
+
70
+
from feast import FeatureView, OnlineConfig
71
+
72
+
user_interactions = FeatureView(
73
+
name="user_interactions",
74
+
entities=[user],
75
+
schema=[...],
76
+
source=interactions_source,
77
+
online_config=OnlineConfig(
78
+
mode="sequence",
79
+
max_length=50,
80
+
max_age=timedelta(days=90),
81
+
write_mode="append",
82
+
),
83
+
)
84
+
```
85
+
86
+
{% hint style="warning" %}
87
+
Sequence configuration is currently an experimental registry contract. Online stores continue to use their existing latest-value behavior until they explicitly implement sequence append, retrieval, and eviction support.
88
+
{% endhint %}
89
+
62
90
## Feature views without entities
63
91
64
92
If a feature view contains features that are not related to a specific entity, the feature view can be defined without entities (only timestamps are needed for this feature view).
0 commit comments