chamikaramj opened a new pull request, #40541: URL: https://github.com/apache/beam/pull/40541
…during job submission. Currently Hugging Face model handlers `HuggingFaceModelHandlerTensor`, `HuggingFaceModelHandlerTensor` and `HuggingFaceModelHandlerKeyedTensor` requires following packages to be available both during job submission and at workers. * torch * transformers * tensorflow These packages and dependencies are extremely large. When installed via PyPI, the size for GPU versions of the packages are approximately: Download size: 4 GB Installed size: 8 GB If we changed to use CPU versions of the packages the sizes are approximately. Download size: 500 MB Installed size: 2 GB This change removes usage of the package for these model handlers from the job submission path so that these package do not have to be available during job submission. The packages just have to be available to workers during execution (for example, provided via a requirements file). I ran following Dataflow pipeline to confirm that torch, transformers, sentence-transformers and tensorflow packages are not used during job submission. These pipelines were run in a virtual environment without these packages and the packages were provided to runtime via a requirements.txt file. https://console.cloud.google.com/dataflow/jobs/us-central1/2026-10-12_13_47_45-11445500235685626598?project=apache-beam-testing https://console.cloud.google.com/dataflow/jobs/us-central1/2026-10-12_14_07_38-716179589100654307?project=apache-beam-testing Similar previous change that removed the `sentense-transformers` package from job submission: https://github.com/apache/beam/pull/40439 Note that this also moves the secondary GPU availability check `is_gpu_available_torch` from the job submission to the runtime. <!-- 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]
