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

   Fixes #41085
   
   `HuggingFaceModelHandlerTensor.run_inference` called a custom `inference_fn` 
with `(batch, model, inference_args, inference_args, model_id)`. 
`TensorInferenceFn` is `(batch, model, device, inference_args, model_id)` and 
the keyed handler already passes `self._device`, so custom functions received 
the `inference_args` dict as `device`. This passes `self._device`.
   
   Added a regression test whose `inference_fn` records the `device` and 
`inference_args` it receives. It fails on master (`{'add': True} != 'CPU'`) and 
passes with the fix; `huggingface_inference_test.py`: 20 passed. yapf and ruff 
are clean on the touched files. CHANGES.md updated.
   
   R: @jrmccluskey
   


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