From 8f7af56fc71757b5989e9460249e2bc0eb92ce48 Mon Sep 17 00:00:00 2001 From: Pritam Dodeja Date: Sun, 8 Mar 2026 18:18:31 -0400 Subject: [PATCH 1/5] build: enable Python 3.12 support and relax core dependency bounds This commit modernizes the TFX orchestrator to support Python 3.12, while relaxing dependency constraints to allow the use of locally compiled component wheels (version 1.17.0 and 1.18.0). Specific changes include: * pyproject.toml: Updated `requires-python` to allow versions up to 3.12 (range changed from <3.11 to <3.13). * pyarrow: Removed the `<11` upper bound constraint. This allows modern Arrow versions (e.g., 14+) to be used, avoiding legacy build failures on Python 3.12. * Dependency Alignment: Expanded version ranges in `tfx/dependencies.py` for ml-metadata, tfx-bsl, tfdv, tfma, and tft. These now allow version 1.17.0 to resolve, preventing Pip from backtracking into incompatible legacy distributions during installation. --- pyproject.toml | 2 +- tfx/dependencies.py | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 10a6c6121d..7f9be614cd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -31,7 +31,7 @@ classifiers = [ "Topic :: Software Development :: Libraries :: Python Modules" ] keywords = ["tensorflow", "tfx"] -requires-python = ">=3.9,<3.11" +requires-python = ">=3.9,<3.13" [project.urls] Homepage = "https://www.tensorflow.org/tfx" Repository = "https://github.com/tensorflow/tfx" diff --git a/tfx/dependencies.py b/tfx/dependencies.py index ca8469aefc..39a62218e8 100644 --- a/tfx/dependencies.py +++ b/tfx/dependencies.py @@ -58,7 +58,7 @@ def make_pipeline_sdk_required_install_packages(): "ml-metadata" + select_constraint( # LINT.IfChange - default=">=1.16.0,<1.17.0", + default=">=1.16.0,<1.19.0", # LINT.ThenChange(tfx/workspace.bzl) nightly=">=1.17.0.dev", git_master="@git+https://github.com/google/ml-metadata@master", @@ -90,7 +90,7 @@ def make_required_install_packages(): "keras-tuner>=1.0.4,<2,!=1.4.0,!=1.4.1", "kubernetes>=10.0.1,<27", "numpy>=1.16,<2", - "pyarrow>=10,<11", + "pyarrow>=10", # TODO: b/358471141 - Orjson 3.10.7 breaks TFX OSS tests. # Unpin once the issue with installation is resolved. "orjson!=3.10.7", @@ -110,26 +110,26 @@ def make_required_install_packages(): "tensorflow-hub>=0.15.0,<0.16", "tensorflow-data-validation" + select_constraint( - default=">=1.16.1,<1.17.0", + default=">=1.16.1,<1.18.0", nightly=">=1.16.1.dev", git_master=("@git+https://github.com/tensorflow/data-validation@master"), ), "tensorflow-model-analysis" + select_constraint( - default=">=0.47.0,<0.48.0", + default=">=0.47.0,<0.49.0", nightly=">=0.47.0.dev", git_master="@git+https://github.com/tensorflow/model-analysis@master", ), "tensorflow-serving-api>=2.16,<2.17", "tensorflow-transform" + select_constraint( - default=">=1.16.0,<1.17.0", + default=">=1.16.0,<1.19.0", nightly=">=1.16.0.dev", git_master="@git+https://github.com/tensorflow/transform@master", ), "tfx-bsl" + select_constraint( - default=">=1.16.1,<1.17.0", + default=">=1.16.1,<1.18.0", nightly=">=1.16.0.dev", git_master="@git+https://github.com/tensorflow/tfx-bsl@master", ), From 3d53fdd19ef4638de0ad5fabb5f730c58f282749 Mon Sep 17 00:00:00 2001 From: Pritam Dodeja Date: Sun, 15 Mar 2026 07:16:51 -0400 Subject: [PATCH 2/5] Remove airflow __init__.py that was causing airflow test to fail --- tfx/orchestration/airflow/__init__.py | 13 ------------- 1 file changed, 13 deletions(-) delete mode 100644 tfx/orchestration/airflow/__init__.py diff --git a/tfx/orchestration/airflow/__init__.py b/tfx/orchestration/airflow/__init__.py deleted file mode 100644 index ca966a36bf..0000000000 --- a/tfx/orchestration/airflow/__init__.py +++ /dev/null @@ -1,13 +0,0 @@ -# Copyright 2019 Google LLC. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. From f53fa09cee90dc70ca9aba3301eb0e0db9732c48 Mon Sep 17 00:00:00 2001 From: Pritam Dodeja Date: Tue, 31 Mar 2026 00:31:11 -0400 Subject: [PATCH 3/5] Allow tensorflow >2.16 --- tfx/dependencies.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tfx/dependencies.py b/tfx/dependencies.py index eaa1808ad4..3da06ad224 100644 --- a/tfx/dependencies.py +++ b/tfx/dependencies.py @@ -105,7 +105,7 @@ def make_required_install_packages(): # Pip might stuck in a TF 1.15 dependency although there is a working # dependency set with TF 2.x without the sync. # pylint: disable=line-too-long - "tensorflow" + select_constraint(">=2.17.0,<2.18"), + "tensorflow" + select_constraint(">=2.16.0,<2.18"), # pylint: enable=line-too-long "tensorflow-hub>=0.15.0,<0.16", "tensorflow-data-validation" From a109eea01d3c2988ca1a0cb711868ab8d4d10e72 Mon Sep 17 00:00:00 2001 From: Pritam Dodeja Date: Tue, 31 Mar 2026 07:57:42 -0400 Subject: [PATCH 4/5] Enable tensorflow-serving-api>=2.16.1 for nightly test --- nightly_test_constraints.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nightly_test_constraints.txt b/nightly_test_constraints.txt index 9e1714c3b1..6eedb5524b 100644 --- a/nightly_test_constraints.txt +++ b/nightly_test_constraints.txt @@ -318,7 +318,7 @@ tensorflow-io==0.24.0 tensorflow-io-gcs-filesystem==0.24.0 tensorflow-metadata>=1.17.1 # tensorflow-ranking==0.5.5 -tensorflow-serving-api==2.17.1 +tensorflow-serving-api>=2.16.1 tensorflow-text==2.17.0 tensorflow-transform>=1.17.0 tensorflow_model_analysis>=0.48.0 From 1d59df8cf0faf2e8ca82e57d684ffe2bb61d7bb9 Mon Sep 17 00:00:00 2001 From: Pritam Dodeja Date: Tue, 31 Mar 2026 08:09:43 -0400 Subject: [PATCH 5/5] Enable tensorflow-serving-api>=2.16.1 for test constraint --- test_constraints.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test_constraints.txt b/test_constraints.txt index de61db74fb..8c7075bd29 100644 --- a/test_constraints.txt +++ b/test_constraints.txt @@ -318,7 +318,7 @@ tensorflow-io==0.24.0 tensorflow-io-gcs-filesystem==0.24.0 tensorflow-metadata>=1.16.1 # tensorflow-ranking==0.5.5 -tensorflow-serving-api==2.17.1 +tensorflow-serving-api>=2.16.1 tensorflow-text==2.17.0 tensorflow-transform>=1.17.0 tensorflow_model_analysis>=0.48.0