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

   This PR has two related, but technically independent efforts. 
   
   **1. Support for batched keyed examples.**
   We currently only support ability to pass in a single Tensor that does not 
have any keys attached to it: `model(batched_input)`. We want to support 
passing in key-batched values to pytorch model via kwargs in model() call. like 
so: `model(**batched_inputs)`.
   
   Implementation: Because of the way Beam returns BatchElements(), we will 
convert a list of (key to Tensor) dicts into a dict of Tensor lists.
   
   **2. Support for non-batchable kwargs params.**
   We want to support the ability to pass in non-batchable kwargs params to 
RunInference models, particularly for Pytorch.
   
   This adds the `**kwargs` as an argument to `RunInference`. Since the 
original motivation was for Pytorch models, we added an interpreted parameter 
`prediction_params` to the PytorchInferenceRunner.
   
   ------------------------
   
   Note: This is a squash of https://github.com/apache/beam/pull/17470/ so that 
we can make a distinction in the commit history.


-- 
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