You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by xq...@apache.org on 2025/10/14 19:48:21 UTC
(beam) branch master updated: ci(python-deps): update transformers version constraints in tox (#36506)
This is an automated email from the ASF dual-hosted git repository.
xqhu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/beam.git
The following commit(s) were added to refs/heads/master by this push:
new 37c7e28231b ci(python-deps): update transformers version constraints in tox (#36506)
37c7e28231b is described below
commit 37c7e28231b81d9d10d573bb9f8da55b01ae6cf1
Author: liferoad <hu...@gmail.com>
AuthorDate: Tue Oct 14 15:48:12 2025 -0400
ci(python-deps): update transformers version constraints in tox (#36506)
* ci(python-deps): update transformers version constraints and test command
Add python version-specific constraints for transformers package to avoid union type syntax issues. Also include transformers version check in test command for debugging purposes.
* ci(workflow): increase timeout for python dependency tests
The previous timeout of 180 minutes was insufficient for some test runs, so it was doubled to 360 minutes to prevent premature job termination
---
.github/trigger_files/beam_PostCommit_Python_Dependency.json | 2 +-
.github/workflows/beam_PostCommit_Python_Dependency.yml | 2 +-
sdks/python/tox.ini | 4 ++++
3 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/.github/trigger_files/beam_PostCommit_Python_Dependency.json b/.github/trigger_files/beam_PostCommit_Python_Dependency.json
index 5b57011b2c2..96e4dc0aa99 100644
--- a/.github/trigger_files/beam_PostCommit_Python_Dependency.json
+++ b/.github/trigger_files/beam_PostCommit_Python_Dependency.json
@@ -1,4 +1,4 @@
{
"comment": "Modify this file in a trivial way to cause this test suite to run",
- "modification": 2
+ "modification": 3
}
\ No newline at end of file
diff --git a/.github/workflows/beam_PostCommit_Python_Dependency.yml b/.github/workflows/beam_PostCommit_Python_Dependency.yml
index c1dfb34e015..b92c6d75483 100644
--- a/.github/workflows/beam_PostCommit_Python_Dependency.yml
+++ b/.github/workflows/beam_PostCommit_Python_Dependency.yml
@@ -60,7 +60,7 @@ jobs:
job_name: ['beam_PostCommit_Python_Dependency']
job_phrase: ['Run Python PostCommit Dependency']
python_version: ['3.9','3.13']
- timeout-minutes: 180
+ timeout-minutes: 360
if: |
github.event_name == 'workflow_dispatch' ||
github.event_name == 'pull_request_target' ||
diff --git a/sdks/python/tox.ini b/sdks/python/tox.ini
index 7ab38eaf277..7808422465c 100644
--- a/sdks/python/tox.ini
+++ b/sdks/python/tox.ini
@@ -557,12 +557,16 @@ commands =
deps =
sentence-transformers==3.3.1
accelerate>=1.6.0
+ # Use Python version-specific transformers constraints to avoid union type syntax issues
+ transformers>=4.28.0,<4.55.0; python_version < "3.10"
+ transformers>=4.28.0,<4.56.0; python_version >= "3.10"
passenv = HF_INFERENCE_TOKEN
extras = test,gcp
commands =
# Log aiplatform and its dependencies version for debugging
/bin/sh -c "pip freeze | grep -E sentence-transformers"
/bin/sh -c "pip freeze | grep -E google-cloud-aiplatform"
+ /bin/sh -c "pip freeze | grep -E transformers"
# Allow exit code 5 (no tests run) so that we can run this command safely on arbitrary subdirectories.
/bin/sh -c 'pytest apache_beam/ml/transforms/embeddings -o junit_suite_name={envname} --junitxml=pytest_{envname}.xml -n 6 {posargs}; ret=$?; [ $ret = 5 ] && exit 0 || exit $ret'