@@ -168,6 +168,10 @@ def cythonize(*args, **kwargs):
168168ml_base_core = [
169169 'embeddings>=0.0.4' , # 0.0.3 crashes setuptools
170170 'onnxruntime' ,
171+ # onnx 1.12–1.13 cap protobuf in ways that trigger huge backtracking with
172+ # Beam[gcp]+ml_test; pip can fall back to onnx 1.11 sdist which needs cmake.
173+ # 1.14.1+ matches tf2onnx>=1.16 and ships manylinux wheels for py3.10.
174+ 'onnx>=1.14.1,<2' ,
171175 'langchain' ,
172176 'sentence-transformers>=2.2.2' ,
173177 'skl2onnx' ,
@@ -176,7 +180,6 @@ def cythonize(*args, **kwargs):
176180 # tensorflow transitive dep, lower versions not compatible with Python3.10+
177181 'absl-py>=0.12.0' ,
178182 'tensorflow-hub' ,
179- 'tf2onnx' ,
180183 'torch' ,
181184 'transformers' ,
182185]
@@ -186,6 +189,8 @@ def cythonize(*args, **kwargs):
186189 'opentelemetry-api==1.37.0' ,
187190 'opentelemetry-sdk==1.37.0' ,
188191 'opentelemetry-exporter-otlp-proto-http==1.37.0' ,
192+ # protobuf>=5 (ADK/OTel); tf2onnx 1.16.x pins protobuf~=3.20 only.
193+ 'tf2onnx>=1.17.0,<1.18' ,
189194]
190195
191196ml_base = ml_base_core + ml_adk_dependency
@@ -564,6 +569,8 @@ def get_portability_package_data():
564569 # tests due to tag check introduced since pip 24.2
565570 # https://github.com/apache/beam/issues/31285
566571 # 'xgboost<2.0', # https://github.com/apache/beam/issues/31252
572+ # tft needs protobuf<5; tf2onnx 1.17+ allows protobuf 5 (ADK only).
573+ 'tf2onnx>=1.16.1,<1.17' ,
567574 ] + ml_base_core ,
568575 'p310_ml_test' : [
569576 'datatable' ,
0 commit comments