feat: Added ray example template by ntkathole · Pull Request #5570 · feast-dev/feast
Add example template for Ray.
# feast init -t ray
Ray template initialized with sample data:
- Driver stats: /feast-projects/sacred_rodent/feature_repo/data/driver_stats.parquet
- Customer profiles: /feast-projects/sacred_rodent/feature_repo/data/customer_daily_profile.parquet
- Ray storage will be created at: /feast-projects/sacred_rodent/feature_repo/data/ray_storage
To get started:
1. cd sacred_rodent/feature_repo
2. feast apply
3. python test_workflow.py
Creating a new Feast repository in /feast-projects/sacred_rodent.
# python test_workflow.py
============================================================
🚀 Ray Offline Store & Compute Engine Demo
============================================================
1. Initializing Feast with Ray configuration...
✓ Offline store: ray
✓ Compute engine: ray.engine
2. Creating entity DataFrame for historical feature retrieval...
✓ Created entity DataFrame with 3 rows
✓ Time range: 2025-08-15 12:00:00 to 2025-08-17 12:00:00
3. Retrieving historical features with Ray compute engine...
(This demonstrates distributed point-in-time joins)
✓ Retrieved 3 historical feature rows
✓ Features: ['driver_id', 'customer_id', 'event_timestamp', 'conv_rate', 'acc_rate', 'avg_daily_trips', 'current_balance', 'avg_passenger_count', 'lifetime_trip_count']
Sample historical features:
driver_id customer_id event_timestamp conv_rate acc_rate avg_daily_trips current_balance avg_passenger_count lifetime_trip_count
1001 2001 2025-08-16 12:00:00+00:00 0.253998 0.016639 76 738.030300 1.841441 387
1002 2002 2025-08-17 00:00:00+00:00 0.734615 0.839181 79 83.531244 2.651579 342
1003 2003 2025-08-17 06:00:00+00:00 0.768238 0.294502 968 39.029157 3.438895 215
4. Testing on-demand feature transformations...
✓ Retrieved 1 rows with on-demand transformations
Sample with on-demand features:
driver_id conv_rate acc_rate conv_rate_plus_acc_rate
1001 0.253998 0.016639 0.270637
5. Materializing features to online store...
Attempting materialization up to 2025-08-17 12:00:00
Materializing 2 feature views to 2025-08-17 12:00:00+00:00 into the sqlite online store.
driver_hourly_stats from 2025-08-10 06:31:21+00:00 to 2025-08-17 12:00:00+00:00:
customer_daily_profile from 2025-08-10 06:31:26+00:00 to 2025-08-17 12:00:00+00:00:
✓ Ray compute engine materialization successful!
6. Testing online feature serving...
✓ Retrieved 2 online feature rows
Sample online features:
driver_id customer_id conv_rate acc_rate current_balance
1001 2001 0.542408 0.615162 55.650719
1002 2002 0.326722 0.137612 440.106567
============================================================
🎉 Ray Demo Complete!
============================================================
If you want to explore Feast with your existing ray cluster, you can configure ray_address to feature_store.yaml:
offline_store:
ray_address: "127.0.0.1:10001"
batch_engine:
ray_address: "127.0.0.1:10001"