This is an automated email from the ASF dual-hosted git repository.

Amar3tto pushed a commit to branch cp-38505
in repository https://gitbox.apache.org/repos/asf/beam.git

commit 6c193617e11f417d65bf5bb98b0418886c518c56
Author: Vitaly Terentyev <[email protected]>
AuthorDate: Fri May 15 14:24:27 2026 +0400

    [Cherrypick] Set torch upper bound to fix ml python test (#38505)
---
 sdks/python/setup.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/sdks/python/setup.py b/sdks/python/setup.py
index 45781a44c4b..4c1384c3151 100644
--- a/sdks/python/setup.py
+++ b/sdks/python/setup.py
@@ -198,7 +198,8 @@ ml_base_core = [
     # Drop this cap once transformers updates the CLIP call site to
     # `cls_token=` or tokenizers reinstates `cls=` as a deprecation alias.
     'tokenizers<0.23',
-    'torch',
+    # Avoid torch 2.12.0+ which fails to run unit tests with segfault.
+    'torch<2.12.0',
     # Match tested transformers range.
     'transformers>=4.28.0,<4.56.0',
     # Keep tokenizers compatible with this transformers range.

Reply via email to