From 59bdef97c80e51189ff8b3b4b2e3c8d88dc02851 Mon Sep 17 00:00:00 2001 From: Graph Learning Team Date: Mon, 26 Oct 2026 12:09:42 -0700 Subject: [PATCH] Upgrade `build-and-test-nightly` GitHub Actions workflow to Python 3.14. PiperOrigin-RevId: 1007451526 --- .github/workflows/ci-build.yml | 2 +- ci/build-gha.sh | 9 +++++---- pyproject.toml | 23 ++++++++++++++++++++++- 3 files changed, 28 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index 16785291..618d92ee 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -58,6 +58,6 @@ jobs: uses: ./.github/workflows/build-reusable.yml with: job_name: 'build-and-test-nightly' - python_version: '3.13' + python_version: '3.14' test_tf_nightly: true tag_filters: '' diff --git a/ci/build-gha.sh b/ci/build-gha.sh index b9fb1856..eb94448d 100755 --- a/ci/build-gha.sh +++ b/ci/build-gha.sh @@ -99,11 +99,12 @@ python --version pip install --upgrade pip if [[ "$TEST_TF_NIGHTLY" == "true" ]]; then - # Install and test with Vizier: b/394062744 does not affect tf-nightly. - tf_wheels=(dist/tensorflow_gnn-*.whl) - pip install "${tf_wheels[0]}[vizier]" - pip uninstall -y tensorflow tf-keras ai-edge-litert + # Install the wheel with --no-deps so pip does not try to resolve released + # tensorflow/tf-keras packages (which may not have wheels for the latest + # Python version yet); test-nightly provides tf-nightly and all runtime deps. pip install --group test-nightly --progress-bar off --upgrade + tf_wheels=(dist/tensorflow_gnn-*.whl) + pip install --no-deps "${tf_wheels[0]}" # Check that tf-nightly is installed but tensorflow is not # Also check that tf-keras-nightly is installed. diff --git a/pyproject.toml b/pyproject.toml index b7ab165c..787c3bdb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -8,16 +8,19 @@ dynamic = ["version"] license = "Apache-2.0" requires-python = ">=3.10, <4" dependencies = [ + # Keep non-TF dependencies in sync with test-nightly below. + # LINT.IfChange(non_tf_dependencies) "ml-collections>=1.1.0", "networkx>=3.4.2", "pyarrow>=18.1.0", - "tensorflow>=2.17.0, <3", # Raised lower bound to 2.57 to enable python 3.12+ support. "apache-beam>=2.57, <3", # This dependency comes from apache beam implementing it as an extra for 2.70. # To maintain current compatibility with pre and post 2.70, we need to include it here. b/465442394 "crcmod>=1.7, <2", "tensorboard", + # LINT.ThenChange(:test_nightly_non_tf_dependencies) + "tensorflow>=2.17.0, <3", "tf-keras>=2.17.0, <3", ] authors = [ @@ -47,7 +50,10 @@ source = "https://github.com/tensorflow/gnn.git" [project.optional-dependencies] vizier = [ + # Keep in sync with test-nightly below. + # LINT.IfChange(vizier_dependency) "google-vizier>=0.0.13, !=0.1.23", # Moved to extras due to dependency conflicts. b/394062744 + # LINT.ThenChange(:test_nightly_vizier_dependency) "tensorflow>=2.18.0, <3", ] @@ -59,10 +65,25 @@ test-released = [ "ai-edge-litert", {include-group = "test-base"}, ] +# Includes non-TF runtime and vizier dependencies so the wheel can be installed +# with --no-deps when testing against tf-nightly on new Python versions before +# stable tensorflow/tf-keras wheels are released. test-nightly = [ + # LINT.IfChange(test_nightly_non_tf_dependencies) + "ml-collections>=1.1.0", + "networkx>=3.4.2", + "pyarrow>=18.1.0", + "apache-beam>=2.57, <3", + "crcmod>=1.7, <2", + "tensorboard", + # LINT.ThenChange(:non_tf_dependencies) "tf-nightly", "tf-keras-nightly", "ai-edge-litert-nightly", + # Install and test with Vizier: b/394062744 does not affect tf-nightly. + # LINT.IfChange(test_nightly_vizier_dependency) + "google-vizier>=0.0.13, !=0.1.23", + # LINT.ThenChange(:vizier_dependency) {include-group = "test-base"}, ]