tvalentyn opened a new pull request, #40603:
URL: https://github.com/apache/beam/pull/40603

   
   * Add max_batch_weight to BatchElements. When set, the batch size limits
     count elements and element_size_fn gives the weight of an element. This
     fixes RunInference failing with a TypeError when a ModelHandler sets
     max_batch_weight.
   * Honor element_size_fn when max_batch_duration_secs is set. This uses a
     separate stateful DoFn that only adds a 'weight' state and keeps the
     transform label, so pipelines that don't set element_size_fn are
     unaffected.
   * Never emit an empty batch when an element exceeds the limits on its own.
   * Warn when length_fn is set without max_batch_duration_secs, since it is
     ignored.<!--
   
   Thank you for your contribution! Follow this checklist to help us 
incorporate your contribution quickly and easily:
   
    - [ ] If this contribution is large, please file an Apache [Individual 
Contributor License Agreement](https://www.apache.org/licenses/icla.pdf).
    - [ ] Replace these instructions with a description of your change and why 
you have made it.
    - [ ] Mention the appropriate issue in your description (for example: 
`addresses #123` or `fixes #456`).
    - [ ] Update `CHANGES.md` with noteworthy changes.
   
   See [CONTRIBUTING.md]() for more details.
   
   -->
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to