Repository navigation
Closed
Labels
Community Contribution NeededWe want community to contributeWe want community to contributekind/featureNew feature or requestNew feature or requestwontfixThis will not be worked onThis will not be worked on
Description
Is your feature request related to a problem? Please describe.
The current OnlineStore read and write interfaces are batched with respect to entity rows, but not with respect to feature views:
@abstractmethod
def online_read(
self,
config: RepoConfig,
table: FeatureView,
entity_keys: List[EntityKeyProto],
requested_features: Optional[List[str]] = None,
) -> List[Tuple[Optional[datetime], Optional[Dict[str, ValueProto]]]]:
@abstractmethod
def online_write_batch(
self,
config: RepoConfig,
table: FeatureView,
data: List[
Tuple[EntityKeyProto, Dict[str, ValueProto], datetime, Optional[datetime]]
],
progress: Optional[Callable[[int], Any]],
) -> None:
This makes it difficult to do store-specific optimizations. For example, batching Redis retrievals could lead to a significant speedup.
Describe the solution you'd like
Introduce non-breaking (e.g. non-abstract) methods to the OnlineStore interface:
@abstractmethod
def online_read(
self,
config: RepoConfig,
tables: List[FeatureView],
entity_keys: List[EntityKeyProto],
requested_features: Optional[List[str]] = None,
) -> List[Tuple[Optional[datetime], Optional[Dict[str, ValueProto]]]]:
@abstractmethod
def online_write_batch(
self,
config: RepoConfig,
tables: List[FeatureView],
data: List[
Tuple[EntityKeyProto, Dict[str, ValueProto], datetime, Optional[datetime]]
],
progress: Optional[Callable[[int], Any]],
) -> None:
Describe alternatives you've considered
N/A
Additional context
This is partially motivated by #2254. In particular, having a batch interface would allow for greater optimizations to the Redis online store implementation.
Metadata
Metadata
Assignees
Labels
Community Contribution NeededWe want community to contributeWe want community to contributekind/featureNew feature or requestNew feature or requestwontfixThis will not be worked onThis will not be worked on
Type
Projects
- StatusShow more project fieldsDone
Activity
judahrand commentedon Feb 4, 2022
Slightly tangential but also worth noting that there doesn't seem to be any real reason to pass
entity_keysasList[EntityKeyProto]anymore. Creating these Proto objects is unnecessary overhead when the OnlineStores could just useMapping[str, ValueProto]. It's a less important optimization but if we're thinking of changing the interface anyway 🤷stale commentedon Jun 12, 2022
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.
stale commentedon Dec 20, 2022
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.