Skip to content

Conversation

@damccorm
Copy link
Contributor

@damccorm damccorm commented Oct 7, 2025

While we can't actually package this in a dockerfile because of licensing issues, this provides a reproducable set of requirements that we can build/test against, and which external users can use to generate their containers.

We can also eventually point to third party providers who publish these containers (e.g. I plan to publish this in a Google-maintained container registry).

Currently, this scopes out Python 3.9 and 3.13

  • 3.9 is scoped out because I ran into minor issues with dependency conflicts around transformers versions. These could be fixed, but I didn't bother since we will remove 3.9 support with the next release
  • 3.13 requires some wheels to be built on the fly since not all packages provide prebuilt wheels. This is generally fine, but causes issues for some wheels which require rust to be built (this is not part of our CI env, and ideally wouldn't be in most users' containers). I filed [Task]: Add 3.13 GPU containers when dependencies are ready #36637 to track this.

With these changes, I was able to auto-generate #36650 by running the update python dependencies action.

Part of #35487


Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:

  • Mention the appropriate issue in your description (for example: addresses #123), if applicable. This will automatically add a link to the pull request in the issue. If you would like the issue to automatically close on merging the pull request, comment fixes #<ISSUE NUMBER> instead.
  • Update CHANGES.md with noteworthy changes.
  • If this contribution is large, please file an Apache Individual Contributor License Agreement.

See the Contributor Guide for more tips on how to make review process smoother.

To check the build health, please visit https://github.com/apache/beam/blob/master/.test-infra/BUILD_STATUS.md

GitHub Actions Tests Status (on master branch)

Build python source distribution and wheels
Python tests
Java tests
Go tests

See CI.md for more information about GitHub Actions CI or the workflows README to see a list of phrases to trigger workflows.

@github-actions github-actions bot added the python label Oct 7, 2025
@github-actions github-actions bot added the docker label Oct 7, 2025
@Amar3tto
Copy link
Collaborator

Amar3tto commented Oct 8, 2025

@damccorm I used your changes plus fixed OutOfMemory issue, but there is still an error with starting VLLM server.
Could you please help to understand what happened?
https://github.com/apache/beam/actions/runs/18342904797/job/52242432601

@damccorm
Copy link
Contributor Author

damccorm commented Oct 8, 2025

This PR is unrelated to that flakiness, so I wouldn't expect it to make a difference immediately.

In the logs, I now see a bunch of failures like:

RuntimeError: self and mat2 must have the same dtype, but got Float and Half

I'm not 100% sure what would cause that error, but it may be a consequence of trying to run Gemma on a T4 - could you try updating to an L4 to see if that solves the problem?

@Amar3tto Amar3tto mentioned this pull request Oct 9, 2025
3 tasks
@Amar3tto
Copy link
Collaborator

Amar3tto commented Oct 9, 2025

This PR is unrelated to that flakiness, so I wouldn't expect it to make a difference immediately.

In the logs, I now see a bunch of failures like:

RuntimeError: self and mat2 must have the same dtype, but got Float and Half

I'm not 100% sure what would cause that error, but it may be a consequence of trying to run Gemma on a T4 - could you try updating to an L4 to see if that solves the problem?

It helped, now I have a green run. Still need to investigate the reasons and perform more tests.
Draft PR: #36451

@github-actions github-actions bot added the build label Oct 13, 2025
@codecov
Copy link

codecov bot commented Oct 27, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 55.10%. Comparing base (471050c) to head (3e17728).
⚠️ Report is 15 commits behind head on master.

Additional details and impacted files
@@              Coverage Diff              @@
##             master   #36420       +/-   ##
=============================================
+ Coverage     36.24%   55.10%   +18.85%     
  Complexity     1666     1666               
=============================================
  Files          1060     1059        -1     
  Lines        165704   165727       +23     
  Branches       1195     1195               
=============================================
+ Hits          60063    91320    +31257     
+ Misses       103465    72231    -31234     
  Partials       2176     2176               
Flag Coverage Δ
python 80.97% <ø> (+40.45%) ⬆️

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

☔ View full report in Codecov by Sentry.
📢 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.

@damccorm damccorm changed the title Add vllm extra Use vLLM extra to generate GPU containers Oct 28, 2025
@damccorm damccorm changed the title Use vLLM extra to generate GPU containers Use vLLM extra to generate GPU requirements files Oct 28, 2025
@damccorm damccorm marked this pull request as ready for review October 28, 2025 16:29
@github-actions
Copy link
Contributor

Checks are failing. Will not request review until checks are succeeding. If you'd like to override that behavior, comment assign set of reviewers

@damccorm
Copy link
Contributor Author

assign set of reviewers

@github-actions
Copy link
Contributor

Assigning reviewers:

R: @tvalentyn for label python.
R: @Abacn for label build.

Note: If you would like to opt out of this review, comment assign to next reviewer.

Available commands:

  • stop reviewer notifications - opt out of the automated review tooling
  • remind me after tests pass - tag the comment author after tests pass
  • waiting on author - shift the attention set back to the author (any comment or push by the author will return the attention set to the reviewers)

The PR bot will only process comments in the main thread (not review comments).

INDEX_URL_OPTION="--extra-index-url https://download.pytorch.org/whl/cpu"
if [[ $EXTRAS == *"vllm"* ]]; then
# Explicitly install torch to avoid https://github.com/facebookresearch/xformers/issues/740
# This should be overwritten later since the vllm extra is installed alongside torch
Copy link
Contributor

@tvalentyn tvalentyn Oct 28, 2025

Choose a reason for hiding this comment

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

This should be overwritten later

I don't quite follow the comment. Could you please clarify what is being overwritten?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks - I agree this was unclear. I was trying to say that the torch version we install here doesn't matter since torch will get installed anyways later as part of the vllm install (and that will determine the actual version which is installed). Hopefully the new comment is clearer

source "$ENV_PATH"/bin/activate
pip install --upgrade pip setuptools wheel

# For non-vllm (non-gpu) requirement files, force downloading torch from CPU wheels
Copy link
Contributor

Choose a reason for hiding this comment

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

Does the outcome of the generated requirements file depend on which wheel is installed (cpu vs non-cpu)? If so, is it because the dependencies of torch change?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes - specifically

has a cpu postfix, and some gpu requirements (which are not ASF-license compliant) are omitted

@tvalentyn
Copy link
Contributor

Thanks!

@damccorm damccorm merged commit d90b4e8 into master Oct 31, 2025
130 of 138 checks passed
@damccorm damccorm deleted the users/damccorm/vllmExtra branch October 31, 2025 16:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants