tvalentyn opened a new pull request, #41915: URL: https://github.com/apache/beam/pull/41915
KeyedModelHandler (with a single model) and MaybeKeyedModelHandler pass the unkeyed batch to the wrapped handler as a tuple. Hugging Face pipelines only treat a list as a batch of examples and process any other input as a single example. A keyed batch with more than one element therefore failed, or silently returned predictions of the first example for the other examples, depending on the task. Beam YAML RunInference was affected as well, because it always wraps the model handler in a KeyedModelHandler. Convert a tuple batch to a list in HuggingFacePipelineModelHandler.run_inference, so that the default and custom inference functions receive the same input with and without keys. fixes: #41913 -- 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]
