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
@@ -148,30 +148,30 @@ The key fixtures are the `environment` and `universal_data_sources` fixtures, wh
148
148
149
149
## Writing a new test or reusing existing tests
150
150
151
-
To add a new test to an existing test file:
151
+
### To add a new test to an existing test file
152
152
153
153
* Use the same function signatures as an existing test (e.g. use `environment` as an argument) to include the relevant test fixtures.
154
154
* If possible, expand an individual test instead of writing a new test, due to the cost of standing up offline / online stores.
155
155
156
-
To test a new offline / online store from a plugin repo:
156
+
### To test a new offline / online store from a plugin repo
157
157
158
158
* Install Feast in editable mode with `pip install -e`.
159
159
* The core tests for offline / online store behavior are parametrized by the `FULL_REPO_CONFIGS` variable defined in `feature_repos/repo_configuration.py`. To overwrite this variable without modifying the Feast repo, create your own file that contains a `FULL_REPO_CONFIGS` (which will require adding a new `IntegrationTestRepoConfig` or two) and set the environment variable `FULL_REPO_CONFIGS_MODULE` to point to that file. Then the core offline / online store tests can be run with `make test-python-universal`.
160
160
* See the [custom offline store demo](https://github.com/feast-dev/feast-custom-offline-store-demo) and the [custom online store demo](https://github.com/feast-dev/feast-custom-online-store-demo) for examples.
161
161
162
-
To include a new offline / online store in the main Feast repo:
162
+
### To include a new offline / online store in the main Feast repo
163
163
164
164
* Extend `data_source_creator.py` for your offline store.
165
165
* In `repo_configuration.py` add a new`IntegrationTestRepoConfig` or two (depending on how many online stores you want to test).
166
166
* Run the full test suite with `make test-python-integration.`
167
167
168
-
To include a new online store:
168
+
### To include a new online store
169
169
170
170
* In `repo_configuration.py` add a new config that maps to a serialized version of configuration you need in `feature_store.yaml` to setup the online store.
171
171
* In `repo_configuration.py`, add new`IntegrationTestRepoConfig` for offline stores you want to test.
172
172
* Run the full test suite with `make test-python-integration`
173
173
174
-
To use custom data in a new test:
174
+
### To use custom data in a new test
175
175
176
176
* Check `test_universal_types.py` for an example of how to do this.
3. Write stream 2 values to an offline store as a historical log for training
16
+
4. Write stream 2 values to an online store for low latency feature serving
17
+
5. Periodically materialize feature values from the offline store into the online store for improved correctness
18
+
19
+
Feast now allows users to push features previously registered in a feature view to the online store. This most commonly would be done from a stream processing job (e.g. a Beam or Spark Streaming job). Future versions of Feast will allow writing features directly to the offline store as well.
20
+
21
+
## Example
22
+
23
+
See [https://github.com/feast-dev/feast-demo](https://github.com/feast-dev/on-demand-feature-views-demo) for an example on how to use on demand feature views.
24
+
25
+
We register a feature view as normal, and during stream processing (e.g. Kafka consumers), now we push a dataframe matching the feature view schema:
Feast will coordinate between pushed stream data and regular materialization jobs to ensure only the latest feature values are written to the online store. This ensures correctness in served features for model inference.
0 commit comments