Note
In the provided sample, the command feast materialize-incremental $CURRENT_TIME may not work, so we specify a broader time range here.
1
2
3
4
5
6
7
8
01/04/2025 10:28:40 AM root WARNING: _list_feature_views will make breaking changes. ...
Materializing 2 feature views from 1970-01-01 09:00:00+09:00 to 2025-01-04 10:24:24+09:00 into the sqlite online store.
driver_hourly_stats_fresh:
0%|| 0/5 ...
100%|███████████████████████████████████████████████████████████████| 5/5 ...
driver_hourly_stats:
100%|███████████████████████████████████████████████████████████████| 5/5 ...
3. Retrieving Data from the Online Store
Use Jupyter Notebook to fetch data from the Online Store:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
frompprintimportpprintfromfeastimportFeatureStorestore=FeatureStore(repo_path=".")feature_vector=store.get_online_features(features=['driver_hourly_stats:conv_rate','driver_hourly_stats:acc_rate','driver_hourly_stats:avg_daily_trips'],entity_rows=[{"driver_id":1001}]).to_dict()pprint(feature_vector)# Make prediction# model.predict(feature_vector)
We’ve successfully materialized data in the Online Store and fetched it using Feast.
Summary
We followed the Feast tutorial to prepare training data, materialize that data into the Online Store, and retrieve it. By managing both training and inference datasets in Feast, you can avoid training-serving skew, enhancing the consistency of your ML workflows.