Skip to content

Bump torch to 2.13.0 in /sdks/python/apache_beam/examples/ml-orchestration/kfp/components/preprocessing - #41653

Draft
derrickaw wants to merge 1 commit into
masterfrom
vuln/pip-torch-kfp-preprocessing
Draft

derrickaw wants to merge 1 commit into
masterfrom
vuln/pip-torch-kfp-preprocessing

Conversation

@derrickaw

Copy link
Copy Markdown
Collaborator

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

Bumps torch from 2.8.0 to 2.13.0 (along with matching torchvision==0.28.0, apache_beam[gcp]==2.78.0, numpy==1.26.4, and FROM python:3.11-slim, matching sibling KFP train component in #41417) in /sdks/python/apache_beam/examples/ml-orchestration/kfp/components/preprocessing to remediate 4 open Dependabot security alerts:

  • CVE-2026-24747 (< 2.10.0, High)
  • CVE-2025-2999 (< 2.9.1, Medium)
  • CVE-2025-3000 (<= 2.12.1, Low)
  • CVE-2025-3001 (< 2.10.0, Low)

Verification

  • Verified full dependency resolution (pip check) and functional execution of src/preprocess.py (T.ToTensor(), TF.resize(), clean_text(), serialize_example(), and apache_beam imports) in an isolated virtual environment with apache_beam[gcp]==2.78.0, requests==2.33.0, torch==2.13.0, torchvision==0.28.0, numpy==1.26.4, and Pillow==13.0.0.

@derrickaw derrickaw added the dependencies Pull requests that update a dependency file label Nov 24, 2026
@derrickaw

Copy link
Copy Markdown
Collaborator Author

/gemini review

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📋 Review Summary

This PR updates the base Docker image and Python dependencies in the KFP preprocessing example component so that Pillow==13.0.0, requests==2.33.0, and torch==2.13.0 (which require Python >=3.10 / >=3.11) can be installed without dependency resolution conflicts. The updated package versions (python:3.11-slim, apache_beam[gcp]==2.78.0, torch==2.13.0, torchvision==0.28.0, and numpy==1.26.4) are mutually compatible and align with the changes previously made to the train component in #41417.

🔍 General Feedback

  • All pinned dependencies have pre-built cp311 wheels available on PyPI and compatible version constraints (torchvision==0.28.0 pairs with torch==2.13.0, and apache_beam==2.78.0 supports numpy==1.26.4).
  • No issues found; the changes are clean and ready to merge.

💡 Tip: Comment /gemini review on this pull request to trigger a new Gemini code review.

@github-actions github-actions Bot added python examples size/s S: 10-49 lines changed labels Nov 24, 2026
@codecov

codecov Bot commented Nov 24, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 58.72%. Comparing base (2b7eb6b) to head (ca2f9a2).
⚠️ Report is 3 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##             master   #41653      +/-   ##
============================================
- Coverage     58.73%   58.72%   -0.01%     
  Complexity     2315     2315              
============================================
  Files          1135     1135              
  Lines        170486   170486              
  Branches       1499     1499              
============================================
- Hits         100128   100123       -5     
- Misses        67811    67816       +5     
  Partials       2547     2547              
Flag Coverage Δ
python 80.66% <ø> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@derrickaw derrickaw added the ready-for-human Draft PR with all checks passing and all review comments resolved, ready for human review label Nov 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file examples python ready-for-human Draft PR with all checks passing and all review comments resolved, ready for human review size/s S: 10-49 lines changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant