@@ -188,7 +188,6 @@ def online_read(
188188 table : FeatureView ,
189189 entity_keys : List [EntityKeyProto ],
190190 requested_features : Optional [List [str ]] = None ,
191- batch_size : int = 20 ,
192191 ) -> List [Tuple [Optional [datetime ], Optional [Dict [str , ValueProto ]]]]:
193192 """
194193 Retrieve feature values from the online DynamoDB store.
@@ -200,15 +199,7 @@ def online_read(
200199 config: The RepoConfig for the current FeatureStore.
201200 table: Feast FeatureView.
202201 entity_keys: a list of entity keys that should be read from the FeatureStore.
203- batch_size: the number of items to send in a batch_get_item request to DynamoDB.
204- DynamoDB record size limit is 400kb and can retrieve 16MB per call, it is recommended
205- to set batch_size value less than 40 to avoid ``UnprocessedKeys`` and
206- ``ValidationException`` errors.
207202 """
208- if batch_size > 40 :
209- raise ValueError (
210- f"batch_size value must be less than 40, input value is { batch_size } "
211- )
212203 online_config = config .online_store
213204 assert isinstance (online_config , DynamoDBOnlineStoreConfig )
214205 dynamodb_resource = self ._get_dynamodb_resource (online_config .region )
@@ -218,6 +209,7 @@ def online_read(
218209 entity_ids = [compute_entity_id (entity_key ) for entity_key in entity_keys ]
219210
220211 len_entity_ids = len (entity_ids )
212+ batch_size = 40
221213 # Iterate until the end_index is the value len_entity_ids
222214 iters = (
223215 len_entity_ids // batch_size + 1
0 commit comments