From 2342abb44be71cba8298e591d7d552c01e6b616e Mon Sep 17 00:00:00 2001 From: aIbrahiim Date: Mon, 27 Apr 2026 14:47:18 +0300 Subject: [PATCH] Pin transformers/tokenizers for ML tests --- .github/trigger_files/beam_PreCommit_Python_ML.json | 4 ++++ sdks/python/setup.py | 5 ++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/trigger_files/beam_PreCommit_Python_ML.json b/.github/trigger_files/beam_PreCommit_Python_ML.json index e69de29bb2d1..8ed972c9f579 100644 --- a/.github/trigger_files/beam_PreCommit_Python_ML.json +++ b/.github/trigger_files/beam_PreCommit_Python_ML.json @@ -0,0 +1,4 @@ +{ + "comment": "Modify this file in a trivial way to cause this test suite to run", + "revision": 3 +} diff --git a/sdks/python/setup.py b/sdks/python/setup.py index 2c1dada3f1f2..8c90657a0c56 100644 --- a/sdks/python/setup.py +++ b/sdks/python/setup.py @@ -186,7 +186,10 @@ def cythonize(*args, **kwargs): 'absl-py>=0.12.0', 'tensorflow-hub', 'torch', - 'transformers', + # Match tested transformers range. + 'transformers>=4.28.0,<4.56.0', + # Keep tokenizers compatible with this transformers range. + 'tokenizers>=0.13.3,<0.22.0', ] ml_adk_dependency = [