bvolpato opened a new pull request, #39953: URL: https://github.com/apache/beam/pull/39953
Related to #38782 and #39949. ## Why The object-detection example describes its inference batch size as fixed, but passes `inference_batch_size` to `PytorchModelHandlerTensor`. That handler does not consume this keyword. It reaches `ModelHandler` through `**kwargs`, where it is ignored, leaving `RunInference` to use adaptive `BatchElements` defaults. This means all four Faster R-CNN benchmark variants have been measuring an unintended batching policy since they were added. ## What changed Pass the configured size through the supported `min_batch_size` and `max_batch_size` arguments. Setting both to the same value makes `BatchElements` use the requested fixed size, currently 8 in the benchmark configuration. This is separate from #39949 because corrected batching may change runtime. The timeout change can remain draft until a Dataflow run shows whether 30 minutes is still insufficient. ## Validation * `python -m py_compile sdks/python/apache_beam/examples/inference/pytorch_image_object_detection.py` * `yapf==0.43.0 --diff` on the changed file * `ruff==0.15.22 check --ignore I001,UP006` on the changed file * `git diff --check` The existing Python ML precommit covers `PytorchModelHandlerTensor` batching behavior. -- 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]
