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
Optimize get_online_features by consolidating calls to online store across multiple feature views #4711
Is your feature request related to a problem? Please describe.
I'm running some benchmarks to measure Python SDK performance and want to discuss a potential improvement on get_online_features implementation.
When using the get_online_features method in the SDK with a Redis online store, performance suffers when handling a feature service that includes multiple feature views. The SDK iterates over each feature view within the feature service and calls online_store.online_read(...) for each view individually.
Although the Redis online store implementation uses Redis pipeline to reduce network roundtrips, the current SDK implementation separates pipeline calls per feature view, leading to inefficiencies that impact overall performance.
Describe the solution you'd like
I think online store interface should have a method to get online features by a list of feature views (or a feature service), and the get_online_features should be changed accordingly.
Additional context
Feast's Java code follows a different implementation. It combines features that share same entity keys before calling online store.
Reacted by Francisco Javier Arceo, Tim Bauer and Alexander Frenzel
I think online store interface should have a method to get online features by a list of feature views
This is sort of already the case, isn't it? The main reason why get_online_features method (and the default logic) was moved from feature_store.py to online_store.py was to make this possible. Before then online_read was the only OnlineStore method that individual implementations could override.
I guess we can have yet another method sitting somewhere between online_read and get_online_features, but I think the best way to discern how that method should look like would be to first rewrite one online store (for example redis) to override get_online_features instead of online_read.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Activity
franciscojavierarceo commentedon Oct 30, 2024
Yeah this makes sense. Would be supportive of this.
tokoko commentedon Nov 2, 2024
This is sort of already the case, isn't it? The main reason why
get_online_featuresmethod (and the default logic) was moved fromfeature_store.pytoonline_store.pywas to make this possible. Before thenonline_readwas the onlyOnlineStoremethod that individual implementations could override.I guess we can have yet another method sitting somewhere between
online_readandget_online_features, but I think the best way to discern how that method should look like would be to first rewrite one online store (for example redis) to overrideget_online_featuresinstead ofonline_read.stale commentedon Apr 26, 2025
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.