Repository navigation
Modifies Hugging Face model handlers to not use ML packages... - #40541
Open
chamikaramj wants to merge 1 commit into
Open
chamikaramj wants to merge 1 commit into
chamikaramj wants to merge 1 commit into
Conversation
Contributor
Author
|
cc: @damccorm |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #40541 +/- ##
============================================
+ Coverage 56.16% 56.34% +0.18%
Complexity 2288 2288
============================================
Files 1124 1124
Lines 178336 178407 +71
Branches 1489 1489
============================================
+ Hits 100170 100532 +362
+ Misses 75645 75354 -291
Partials 2521 2521
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Contributor
|
Assigning reviewers: R: @damccorm for label python. Note: If you would like to opt out of this review, comment Available commands:
The PR bot will only process comments in the main thread (not review comments). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…during job submission.
Currently Hugging Face model handlers
HuggingFaceModelHandlerTensor,HuggingFaceModelHandlerTensorandHuggingFaceModelHandlerKeyedTensorrequires following packages to be available both during job submission and at workers.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-transformerspackage from job submission: #40439Note that this also moves the secondary GPU availability check
is_gpu_available_torchfrom the job submission to the runtime.