Skip to content

Commit e52a895

Browse files
committed
feat: batch_size value must be less than 40
Signed-off-by: Miguel Trejo <armando.trejo.marrufo@gmail.com>
1 parent 307bab9 commit e52a895

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

sdk/python/feast/infra/online_stores/dynamodb.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ def online_read(
188188
table: FeatureView,
189189
entity_keys: List[EntityKeyProto],
190190
requested_features: Optional[List[str]] = None,
191-
batch_size: int = 10,
191+
batch_size: int = 20,
192192
) -> List[Tuple[Optional[datetime], Optional[Dict[str, ValueProto]]]]:
193193
"""
194194
Retrieve feature values from the online DynamoDB store.
@@ -205,6 +205,10 @@ def online_read(
205205
to set batch_size value less than 40 to avoid ``UnprocessedKeys`` and
206206
``ValidationException`` errors.
207207
"""
208+
if batch_size > 40:
209+
raise ValueError(
210+
f"batch_size value must be less than 40, input value is {batch_size}"
211+
)
208212
online_config = config.online_store
209213
assert isinstance(online_config, DynamoDBOnlineStoreConfig)
210214
dynamodb_resource = self._get_dynamodb_resource(online_config.region)

0 commit comments

Comments
 (0)