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

   Note: this PR was auto-generated by tooling. Before moving it out of draft, 
the author has done a full review of the PR, specifically evaluating it on the 
following criteria:
   
   - The PR remediates a confirmed, live vulnerability on `master` that 
Dependabot is not already addressing
   - The version update is minimal, respects Beam's compatibility bounds, and 
avoids unrelated dependency churn
   - Relevant lockfiles, package constraints, and tests have been verified
   
   If you have concerns with the PR or with the underlying methodology used to 
generate this, please comment below - they will be addressed by the author not 
the tooling :)
   
   ## Summary
   - Bumps `transformers` from `4.53.0` to `5.20.2` in 
`sdks/python/apache_beam/ml/inference/huggingface_tests_requirements.txt` 
(matching the `<5.21.0` upper bound in `sdks/python/setup.py`), remediating 5 
open Dependabot alerts (`CVE-2026-9856`, `CVE-2026-80047`, `CVE-2026-5241`, 
`CVE-2026-4372`, `CVE-2026-1839`).
   - Updates 
`sdks/python/apache_beam/examples/inference/huggingface_question_answering.py` 
to use `AutoTokenizer` + `AutoModelForQuestionAnswering` with 
`HuggingFaceModelHandlerKeyedTensor`, since Hugging Face `transformers` v5 
removed `QuestionAnsweringPipeline` and the `'question-answering'` pipeline 
task while retaining `AutoModelForQuestionAnswering`. Preserves the existing 
CLI flags, default `deepset/roberta-base-squad2` checkpoint, and 
`question;answer` output format.
   - Adds `test_hf_fill_mask_pipeline` in 
`sdks/python/apache_beam/ml/inference/huggingface_inference_it_test.py` 
(`HuggingFacePipelineModelHandler` with `PipelineTask.FillMask` on 
`FacebookAI/roberta-base`) so `transformersInferenceTest` retains end-to-end 
integration test coverage for `HuggingFacePipelineModelHandler` alongside 
`test_hf_pipeline` (`huggingface_question_answering`).
   
   ## Verification
   - Verified end-to-end execution of `huggingface_question_answering.run` 
(`deepset/roberta-base-squad2` @ `deedc3e42208524e0df3d9149d1f26aa6934f05f`), 
`huggingface_language_modeling.run`, and 
`HuggingFacePipelineModelHandler(PipelineTask.FillMask)` on 
`transformers==5.20.2` against the expected integration test outputs.
   - Ran `pytest 
sdks/python/apache_beam/ml/inference/huggingface_inference_test.py`, `yapf`, 
`ruff`, and Python 3.11 / 3.13 `pip install --dry-run` resolution checks.
   


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