-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
[Utils] Add a batch policy utility #12430
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
79454bb to
4b03952
Compare
4b03952 to
009bff4
Compare
009bff4 to
a795145
Compare
tiurin
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great utility class @gregfurman! 👏
My comments are mostly about naming, docstrings and constraints. Happy to discuss.
joe4dev
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great review from @tiurin 👍
Not much to add. Well done 👏
4f20d8d to
6ed957b
Compare
tiurin
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for addressing all non-blocking comments! 👍
Motivation
Multiple services require data to be batched before further processing. Where batches can be collected based on:
To solve this problem, the new batcher utility class aims to standardize how we collect and return data needing to be batched. This has the following benefits:
Changes
Batcherutility that allows us to define a batch policy and collect and batch records based:Testing
tests/unit/utils/test_batch_policy.py