2727
2828class OnlineStore (ABC ):
2929 """
30- OnlineStore is an object used for all interaction between Feast and the service used for online storage of
31- features.
30+ The interface that Feast uses to interact with the storage system that handles online features.
3231 """
3332
3433 @abstractmethod
@@ -42,21 +41,20 @@ def online_write_batch(
4241 progress : Optional [Callable [[int ], Any ]],
4342 ) -> None :
4443 """
45- Write a batch of feature rows to the online store. This is a low level interface, not
46- expected to be used by the users directly.
44+ Writes a batch of feature rows to the online store.
4745
48- If a tz-naive timestamp is passed to this method, it should be assumed to be UTC by implementors .
46+ If a tz-naive timestamp is passed to this method, it is assumed to be UTC.
4947
5048 Args:
51- config: The RepoConfig for the current FeatureStore .
52- table: Feast FeatureView
53- data: a list of quadruplets containing Feature data. Each quadruplet contains an Entity Key,
54- a dict containing feature values, an event timestamp for the row, and
55- the created timestamp for the row if it exists.
56- progress: Optional function to be called once every mini- batch of rows is written to
57- the online store. Can be used to display progress.
49+ config: The config for the current feature store .
50+ table: Feature view to which these feature rows correspond.
51+ data: A list of quadruplets containing feature data. Each quadruplet contains an entity
52+ key, a dict containing feature values, an event timestamp for the row, and the created
53+ timestamp for the row if it exists.
54+ progress: Function to be called once a batch of rows is written to the online store, used
55+ to show progress.
5856 """
59- ...
57+ pass
6058
6159 @abstractmethod
6260 def online_read (
@@ -67,20 +65,20 @@ def online_read(
6765 requested_features : Optional [List [str ]] = None ,
6866 ) -> List [Tuple [Optional [datetime ], Optional [Dict [str , ValueProto ]]]]:
6967 """
70- Read feature values given an Entity Key. This is a low level interface, not
71- expected to be used by the users directly.
68+ Reads features values for the given entity keys.
7269
7370 Args:
74- config: The RepoConfig for the current FeatureStore.
75- table: Feast FeatureView
76- entity_keys: a list of entity keys that should be read from the FeatureStore.
77- requested_features: (Optional) A subset of the features that should be read from the FeatureStore.
71+ config: The config for the current feature store.
72+ table: The feature view whose feature values should be read.
73+ entity_keys: The list of entity keys for which feature values should be read.
74+ requested_features: The list of features that should be read.
75+
7876 Returns:
79- Data is returned as a list, one item per entity key in the original order as the entity_keys argument.
80- Each item in the list is a tuple of event_ts for the row, and the feature data as a dict from feature names
81- to values. Values are returned as Value proto message .
77+ A list of the same length as entity_keys. Each item in the list is a tuple where the first
78+ item is the event timestamp for the row, and the second item is a dict mapping feature names
79+ to values, which are returned in proto format .
8280 """
83- ...
81+ pass
8482
8583 @abstractmethod
8684 def update (
@@ -92,7 +90,21 @@ def update(
9290 entities_to_keep : Sequence [Entity ],
9391 partial : bool ,
9492 ):
95- ...
93+ """
94+ Reconciles cloud resources with the specified set of Feast objects.
95+
96+ Args:
97+ config: The config for the current feature store.
98+ tables_to_delete: Feature views whose corresponding infrastructure should be deleted.
99+ tables_to_keep: Feature views whose corresponding infrastructure should not be deleted, and
100+ may need to be updated.
101+ entities_to_delete: Entities whose corresponding infrastructure should be deleted.
102+ entities_to_keep: Entities whose corresponding infrastructure should not be deleted, and
103+ may need to be updated.
104+ partial: If true, tables_to_delete and tables_to_keep are not exhaustive lists, so
105+ infrastructure corresponding to other feature views should be not be touched.
106+ """
107+ pass
96108
97109 def plan (
98110 self , config : RepoConfig , desired_registry_proto : RegistryProto
@@ -101,7 +113,7 @@ def plan(
101113 Returns the set of InfraObjects required to support the desired registry.
102114
103115 Args:
104- config: The RepoConfig for the current FeatureStore .
116+ config: The config for the current feature store .
105117 desired_registry_proto: The desired registry, in proto form.
106118 """
107119 return []
@@ -113,4 +125,12 @@ def teardown(
113125 tables : Sequence [FeatureView ],
114126 entities : Sequence [Entity ],
115127 ):
116- ...
128+ """
129+ Tears down all cloud resources for the specified set of Feast objects.
130+
131+ Args:
132+ config: The config for the current feature store.
133+ tables: Feature views whose corresponding infrastructure should be deleted.
134+ entities: Entities whose corresponding infrastructure should be deleted.
135+ """
136+ pass
0 commit comments