Skip to content

Commit 752712e

Browse files
committed
use tensorflow-transform 1.16
1 parent 6b1b007 commit 752712e

2 files changed

Lines changed: 11 additions & 2 deletions

File tree

sdks/python/setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -541,7 +541,7 @@ def get_portability_package_data():
541541
# tensorflow-transform requires dill, but doesn't set dill as a
542542
# hard requirement in setup.py.
543543
'dill',
544-
'tensorflow-transform',
544+
'tensorflow-transform>=1.16.0,<1.17.0',
545545
# Comment out xgboost as it is breaking presubmit python ml
546546
# tests due to tag check introduced since pip 24.2
547547
# https://github.com/apache/beam/issues/31285

sdks/python/tox.ini

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,12 +105,21 @@ commands =
105105

106106
[testenv:py{310,311}-ml]
107107
# Don't set TMPDIR to avoid "AF_UNIX path too long" errors in certain tests.
108+
# Pin versions to avoid pip backtracking (2+ hours) on self-hosted runners.
109+
# tensorflow 2.17 needs protobuf<5; grpcio-status 1.65 needs protobuf>=5.
110+
# tensorflow-transform 1.17 requires apache-beam<2.51 for py<3.11. Use tft 1.16
111+
# which supports beam>=2.47. grpcio 1.62.2 + protobuf 4.x for compatibility.
108112
deps =
109113
pip==25.0.1
110114
accelerate>=1.6.0
111-
onnx<1.19.0
115+
protobuf>=4.25,<5
116+
grpcio==1.62.2
117+
grpcio-status==1.62.2
118+
tensorflow>=2.16,<2.17
119+
pip_pre = False
112120
setenv =
113121
extras = test,gcp,dataframe,ml_test
122+
install_command = {envbindir}/python -m pip install --retries 10 --extra-index-url https://download.pytorch.org/whl/cpu {opts} {packages}
114123
commands =
115124
# Log tensorflow version for debugging
116125
/bin/sh -c "pip freeze | grep -E tensorflow"

0 commit comments

Comments
 (0)