From 70c8b3767f6ff88b44601e1370ced3ad23d724ff Mon Sep 17 00:00:00 2001 From: mhucka Date: Sat, 6 Dec 2025 23:29:43 +0000 Subject: [PATCH 01/34] Take advantage of more larger job runners Google Core ML has made available to us a larger 32-core Linux runner for GitHub Actions workflows. --- .github/workflows/ci-build-checks.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci-build-checks.yaml b/.github/workflows/ci-build-checks.yaml index 247b3c82b..53d8a2d7b 100644 --- a/.github/workflows/ci-build-checks.yaml +++ b/.github/workflows/ci-build-checks.yaml @@ -54,7 +54,7 @@ jobs: bazel-tests: name: Library tests - runs-on: ubuntu-22.04 + runs-on: linux-x86-n2-32 timeout-minutes: 60 steps: @@ -97,7 +97,7 @@ jobs: tutorials-test: name: Tutorial tests - runs-on: ubuntu-22.04 + runs-on: linux-x86-n2-32 needs: wheel-build timeout-minutes: 60 From fd17cd8c2fe85a8a2f82fc4842946ff3ff480cd4 Mon Sep 17 00:00:00 2001 From: mhucka Date: Sat, 6 Dec 2025 23:38:31 +0000 Subject: [PATCH 02/34] Need to specify container when using self-hosted runners --- .github/workflows/ci-build-checks.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/ci-build-checks.yaml b/.github/workflows/ci-build-checks.yaml index 53d8a2d7b..1cc1b2c39 100644 --- a/.github/workflows/ci-build-checks.yaml +++ b/.github/workflows/ci-build-checks.yaml @@ -55,6 +55,8 @@ jobs: bazel-tests: name: Library tests runs-on: linux-x86-n2-32 + container: + image: us-docker.pkg.dev/ml-oss-artifacts-published/ml-public-container/ml-build:latest timeout-minutes: 60 steps: @@ -98,6 +100,8 @@ jobs: tutorials-test: name: Tutorial tests runs-on: linux-x86-n2-32 + container: + image: us-docker.pkg.dev/ml-oss-artifacts-published/ml-public-container/ml-build:latest needs: wheel-build timeout-minutes: 60 From 4960c3adb34b23f9c491e76b076adf33bd2a5b46 Mon Sep 17 00:00:00 2001 From: mhucka Date: Sat, 6 Dec 2025 23:47:19 +0000 Subject: [PATCH 03/34] The runners seem to be missing lsb-release --- .github/workflows/ci-build-checks.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci-build-checks.yaml b/.github/workflows/ci-build-checks.yaml index 1cc1b2c39..9a50142ea 100644 --- a/.github/workflows/ci-build-checks.yaml +++ b/.github/workflows/ci-build-checks.yaml @@ -63,6 +63,8 @@ jobs: - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 - name: Remove some unnecessary software to free up disk space run: sudo rm -rf /usr/share/dotnet /usr/local/lib/android & + - name: Install lsb-release + run: sudo apt-get update && sudo apt-get install -y --no-install-recommends lsb-release - uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v5 with: python-version: '3.10' From 749f1de96cca72bbfba069c3445a18e3b0e82e1a Mon Sep 17 00:00:00 2001 From: mhucka Date: Sat, 6 Dec 2025 23:50:03 +0000 Subject: [PATCH 04/34] Avoid long lines --- .github/workflows/ci-build-checks.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci-build-checks.yaml b/.github/workflows/ci-build-checks.yaml index 9a50142ea..17353b3b9 100644 --- a/.github/workflows/ci-build-checks.yaml +++ b/.github/workflows/ci-build-checks.yaml @@ -64,7 +64,9 @@ jobs: - name: Remove some unnecessary software to free up disk space run: sudo rm -rf /usr/share/dotnet /usr/local/lib/android & - name: Install lsb-release - run: sudo apt-get update && sudo apt-get install -y --no-install-recommends lsb-release + run: | + sudo apt-get update + sudo apt-get install -y --no-install-recommends lsb-release - uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v5 with: python-version: '3.10' From 916661b2d7b250e0eb07138e16aa64aa83b0a964 Mon Sep 17 00:00:00 2001 From: mhucka Date: Sun, 7 Dec 2025 00:08:50 +0000 Subject: [PATCH 05/34] Tell dpkg not to prompt --- .github/workflows/ci-build-checks.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/ci-build-checks.yaml b/.github/workflows/ci-build-checks.yaml index 17353b3b9..60c0c103d 100644 --- a/.github/workflows/ci-build-checks.yaml +++ b/.github/workflows/ci-build-checks.yaml @@ -73,6 +73,8 @@ jobs: architecture: 'x64' cache: pip - name: Install Bazel on CI + env: + DEBIAN_FRONTEND: noninteractive run: ./scripts/ci_install.sh - name: Configure CI TF run: echo "Y\n" | ./configure.sh @@ -119,6 +121,8 @@ jobs: - name: Install notebook dependencies run: pip install --upgrade pip seaborn==0.10.0 - name: Install Bazel on CI + env: + DEBIAN_FRONTEND: noninteractive run: ./scripts/ci_install.sh - name: Configure CI TF run: echo "Y\n" | ./configure.sh From 3f0eb3a74322b90ee25ed0e36686135a13a5b65c Mon Sep 17 00:00:00 2001 From: mhucka Date: Sun, 7 Dec 2025 00:11:58 +0000 Subject: [PATCH 06/34] Try alternative way to prevent promptinig --- .github/workflows/ci-build-checks.yaml | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci-build-checks.yaml b/.github/workflows/ci-build-checks.yaml index 60c0c103d..4b9ea995d 100644 --- a/.github/workflows/ci-build-checks.yaml +++ b/.github/workflows/ci-build-checks.yaml @@ -64,18 +64,16 @@ jobs: - name: Remove some unnecessary software to free up disk space run: sudo rm -rf /usr/share/dotnet /usr/local/lib/android & - name: Install lsb-release - run: | - sudo apt-get update - sudo apt-get install -y --no-install-recommends lsb-release + run: sudo apt-get install -y --no-install-recommends lsb-release - uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v5 with: python-version: '3.10' architecture: 'x64' cache: pip - name: Install Bazel on CI - env: - DEBIAN_FRONTEND: noninteractive - run: ./scripts/ci_install.sh + run: | + export DEBIAN_FRONTEND=noninteractive + ./scripts/ci_install.sh - name: Configure CI TF run: echo "Y\n" | ./configure.sh - name: Full Library Test From 36bc8c02e39a9450dff6e1e87db154da09cd2bb6 Mon Sep 17 00:00:00 2001 From: mhucka Date: Sun, 7 Dec 2025 00:13:40 +0000 Subject: [PATCH 07/34] Guess you need apt-get update after all --- .github/workflows/ci-build-checks.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci-build-checks.yaml b/.github/workflows/ci-build-checks.yaml index 4b9ea995d..419834e2f 100644 --- a/.github/workflows/ci-build-checks.yaml +++ b/.github/workflows/ci-build-checks.yaml @@ -64,7 +64,9 @@ jobs: - name: Remove some unnecessary software to free up disk space run: sudo rm -rf /usr/share/dotnet /usr/local/lib/android & - name: Install lsb-release - run: sudo apt-get install -y --no-install-recommends lsb-release + run: | + sudo apt-get update + sudo apt-get install -y --no-install-recommends lsb-release - uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v5 with: python-version: '3.10' From 1dde7cf2ff7c0681ba33f33e972544a31d972e6e Mon Sep 17 00:00:00 2001 From: mhucka Date: Sun, 7 Dec 2025 00:17:32 +0000 Subject: [PATCH 08/34] May not need to remove software with new runners --- .github/workflows/ci-build-checks.yaml | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci-build-checks.yaml b/.github/workflows/ci-build-checks.yaml index 419834e2f..7cc600742 100644 --- a/.github/workflows/ci-build-checks.yaml +++ b/.github/workflows/ci-build-checks.yaml @@ -61,12 +61,6 @@ jobs: steps: - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 - - name: Remove some unnecessary software to free up disk space - run: sudo rm -rf /usr/share/dotnet /usr/local/lib/android & - - name: Install lsb-release - run: | - sudo apt-get update - sudo apt-get install -y --no-install-recommends lsb-release - uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v5 with: python-version: '3.10' @@ -121,9 +115,9 @@ jobs: - name: Install notebook dependencies run: pip install --upgrade pip seaborn==0.10.0 - name: Install Bazel on CI - env: - DEBIAN_FRONTEND: noninteractive - run: ./scripts/ci_install.sh + run: | + export DEBIAN_FRONTEND=noninteractive + ./scripts/ci_install.sh - name: Configure CI TF run: echo "Y\n" | ./configure.sh - name: Build Wheel From 016ea74801fb6705be7251a59312423d53782601 Mon Sep 17 00:00:00 2001 From: mhucka Date: Sun, 7 Dec 2025 00:19:45 +0000 Subject: [PATCH 09/34] Bring back lsb-release --- .github/workflows/ci-build-checks.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/ci-build-checks.yaml b/.github/workflows/ci-build-checks.yaml index 7cc600742..a5e4ab52e 100644 --- a/.github/workflows/ci-build-checks.yaml +++ b/.github/workflows/ci-build-checks.yaml @@ -61,6 +61,10 @@ jobs: steps: - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 + - name: Install lsb-release + run: | + sudo apt-get update + sudo apt-get install -y --no-install-recommends lsb-release - uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v5 with: python-version: '3.10' From 978d41386de892b70ac5883e1bc00ae4fb724d80 Mon Sep 17 00:00:00 2001 From: mhucka Date: Sun, 7 Dec 2025 00:28:46 +0000 Subject: [PATCH 10/34] Try remove bazelrc file --- .github/workflows/ci-build-checks.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci-build-checks.yaml b/.github/workflows/ci-build-checks.yaml index a5e4ab52e..60717a8db 100644 --- a/.github/workflows/ci-build-checks.yaml +++ b/.github/workflows/ci-build-checks.yaml @@ -72,7 +72,8 @@ jobs: cache: pip - name: Install Bazel on CI run: | - export DEBIAN_FRONTEND=noninteractive + cat /etc/bazel.bazelrc + rm -f /etc/bazel.bazelrc ./scripts/ci_install.sh - name: Configure CI TF run: echo "Y\n" | ./configure.sh From 5582d7a225b27991358aefd2758e2dbc6df12109 Mon Sep 17 00:00:00 2001 From: mhucka Date: Sun, 7 Dec 2025 00:33:25 +0000 Subject: [PATCH 11/34] Use linux-x86-n2-32 for wheel test too --- .github/workflows/ci-build-checks.yaml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci-build-checks.yaml b/.github/workflows/ci-build-checks.yaml index 60717a8db..f4a317e6c 100644 --- a/.github/workflows/ci-build-checks.yaml +++ b/.github/workflows/ci-build-checks.yaml @@ -33,7 +33,7 @@ permissions: read-all jobs: wheel-build: name: Wheel test - runs-on: ubuntu-22.04 + runs-on: linux-x86-n2-32 timeout-minutes: 60 steps: @@ -72,7 +72,6 @@ jobs: cache: pip - name: Install Bazel on CI run: | - cat /etc/bazel.bazelrc rm -f /etc/bazel.bazelrc ./scripts/ci_install.sh - name: Configure CI TF @@ -120,9 +119,7 @@ jobs: - name: Install notebook dependencies run: pip install --upgrade pip seaborn==0.10.0 - name: Install Bazel on CI - run: | - export DEBIAN_FRONTEND=noninteractive - ./scripts/ci_install.sh + run: ./scripts/ci_install.sh - name: Configure CI TF run: echo "Y\n" | ./configure.sh - name: Build Wheel From edb70e3bb34c798c76a51987c806e8e7c1e4c6f6 Mon Sep 17 00:00:00 2001 From: mhucka Date: Sun, 7 Dec 2025 00:39:42 +0000 Subject: [PATCH 12/34] Adjustments --- .github/workflows/ci-build-checks.yaml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/ci-build-checks.yaml b/.github/workflows/ci-build-checks.yaml index f4a317e6c..2aef788ac 100644 --- a/.github/workflows/ci-build-checks.yaml +++ b/.github/workflows/ci-build-checks.yaml @@ -34,7 +34,11 @@ jobs: wheel-build: name: Wheel test runs-on: linux-x86-n2-32 + container: + image: us-docker.pkg.dev/ml-oss-artifacts-published/ml-public-container/ml-build:latest timeout-minutes: 60 + env: + PIP_ROOT_USER_ACTION: ignore steps: - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 @@ -58,6 +62,8 @@ jobs: container: image: us-docker.pkg.dev/ml-oss-artifacts-published/ml-public-container/ml-build:latest timeout-minutes: 60 + env: + PIP_ROOT_USER_ACTION: ignore steps: - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 @@ -108,6 +114,8 @@ jobs: image: us-docker.pkg.dev/ml-oss-artifacts-published/ml-public-container/ml-build:latest needs: wheel-build timeout-minutes: 60 + env: + PIP_ROOT_USER_ACTION: ignore steps: - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 From 41fa28d5a5b30e90e144a5dc8ec7dcac6893b1ef Mon Sep 17 00:00:00 2001 From: mhucka Date: Sun, 7 Dec 2025 00:40:17 +0000 Subject: [PATCH 13/34] Install lsb-release in tutorial tests job too --- .github/workflows/ci-build-checks.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/ci-build-checks.yaml b/.github/workflows/ci-build-checks.yaml index 2aef788ac..811bd6184 100644 --- a/.github/workflows/ci-build-checks.yaml +++ b/.github/workflows/ci-build-checks.yaml @@ -119,6 +119,10 @@ jobs: steps: - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 + - name: Install lsb-release + run: | + sudo apt-get update + sudo apt-get install -y --no-install-recommends lsb-release - uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v5 with: python-version: '3.10' From 052e9108414c22ca82586be7444bd1c012cf7ddf Mon Sep 17 00:00:00 2001 From: mhucka Date: Sun, 7 Dec 2025 00:42:04 +0000 Subject: [PATCH 14/34] One more place for lsb-release --- .github/workflows/ci-build-checks.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/ci-build-checks.yaml b/.github/workflows/ci-build-checks.yaml index 811bd6184..34327bc24 100644 --- a/.github/workflows/ci-build-checks.yaml +++ b/.github/workflows/ci-build-checks.yaml @@ -42,6 +42,10 @@ jobs: steps: - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 + - name: Install lsb-release + run: | + sudo apt-get update + sudo apt-get install -y --no-install-recommends lsb-release - uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v5 with: python-version: '3.10' From 2f31e3e7e16f16e1842dcff8a6a87cac096f7b45 Mon Sep 17 00:00:00 2001 From: mhucka Date: Sun, 7 Dec 2025 00:44:44 +0000 Subject: [PATCH 15/34] Need to do the same in all jobs --- .github/workflows/ci-build-checks.yaml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci-build-checks.yaml b/.github/workflows/ci-build-checks.yaml index 34327bc24..41c7063e8 100644 --- a/.github/workflows/ci-build-checks.yaml +++ b/.github/workflows/ci-build-checks.yaml @@ -52,7 +52,9 @@ jobs: architecture: 'x64' cache: pip - name: Install Bazel on CI - run: ./scripts/ci_install.sh + run: | + rm -f /etc/bazel.bazelrc + ./scripts/ci_install.sh - name: Configure CI TF run: echo "Y\n" | ./configure.sh - name: Build Wheel Test @@ -135,7 +137,9 @@ jobs: - name: Install notebook dependencies run: pip install --upgrade pip seaborn==0.10.0 - name: Install Bazel on CI - run: ./scripts/ci_install.sh + run: | + rm -f /etc/bazel.bazelrc + ./scripts/ci_install.sh - name: Configure CI TF run: echo "Y\n" | ./configure.sh - name: Build Wheel From 8c169af7eacdacbffa162777fb53a1261fceeb3e Mon Sep 17 00:00:00 2001 From: mhucka Date: Sun, 7 Dec 2025 01:38:30 +0000 Subject: [PATCH 16/34] Try another way --- .github/workflows/ci-build-checks.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci-build-checks.yaml b/.github/workflows/ci-build-checks.yaml index 41c7063e8..10434bec1 100644 --- a/.github/workflows/ci-build-checks.yaml +++ b/.github/workflows/ci-build-checks.yaml @@ -37,8 +37,6 @@ jobs: container: image: us-docker.pkg.dev/ml-oss-artifacts-published/ml-public-container/ml-build:latest timeout-minutes: 60 - env: - PIP_ROOT_USER_ACTION: ignore steps: - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 @@ -47,6 +45,8 @@ jobs: sudo apt-get update sudo apt-get install -y --no-install-recommends lsb-release - uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v5 + env: + PIP_ROOT_USER_ACTION: ignore with: python-version: '3.10' architecture: 'x64' From cc43bdcb2fb3c3592bf3da31001e0b62f5f478f2 Mon Sep 17 00:00:00 2001 From: mhucka Date: Sun, 7 Dec 2025 04:39:45 +0000 Subject: [PATCH 17/34] Try yet another way --- .github/workflows/ci-build-checks.yaml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci-build-checks.yaml b/.github/workflows/ci-build-checks.yaml index 10434bec1..a9f5caa6d 100644 --- a/.github/workflows/ci-build-checks.yaml +++ b/.github/workflows/ci-build-checks.yaml @@ -40,13 +40,13 @@ jobs: steps: - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 - - name: Install lsb-release + - name: Install lsb-release (needed by setup-python) run: | sudo apt-get update sudo apt-get install -y --no-install-recommends lsb-release + - name: Configure pip not to print irrelevant error about running as root + run: echo "PIP_ROOT_USER_ACTION='ignore'" | sudo tee -a /etc/environment - uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v5 - env: - PIP_ROOT_USER_ACTION: ignore with: python-version: '3.10' architecture: 'x64' @@ -77,6 +77,8 @@ jobs: run: | sudo apt-get update sudo apt-get install -y --no-install-recommends lsb-release + - name: Configure pip not to print irrelevant error about running as root + run: echo "PIP_ROOT_USER_ACTION='ignore'" | sudo tee -a /etc/environment - uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v5 with: python-version: '3.10' @@ -129,6 +131,8 @@ jobs: run: | sudo apt-get update sudo apt-get install -y --no-install-recommends lsb-release + - name: Configure pip not to print irrelevant error about running as root + run: echo "PIP_ROOT_USER_ACTION='ignore'" | sudo tee -a /etc/environment - uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v5 with: python-version: '3.10' From 8857f103127cfae4702252e7c7d18f0beb24bd09 Mon Sep 17 00:00:00 2001 From: mhucka Date: Sun, 7 Dec 2025 05:04:40 +0000 Subject: [PATCH 18/34] Try yet another way --- .github/workflows/ci-build-checks.yaml | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci-build-checks.yaml b/.github/workflows/ci-build-checks.yaml index a9f5caa6d..1da93e852 100644 --- a/.github/workflows/ci-build-checks.yaml +++ b/.github/workflows/ci-build-checks.yaml @@ -45,8 +45,13 @@ jobs: sudo apt-get update sudo apt-get install -y --no-install-recommends lsb-release - name: Configure pip not to print irrelevant error about running as root - run: echo "PIP_ROOT_USER_ACTION='ignore'" | sudo tee -a /etc/environment + run: | + echo 'Defaults env_keep += "PIP_ROOT_USER_ACTION"' | \ + sudo tee /etc/sudoers.d/pip-root-action > /dev/null + sudo chmod 440 /etc/sudoers.d/pip-root-action - uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v5 + env: + PIP_ROOT_USER_ACTION: ignore with: python-version: '3.10' architecture: 'x64' @@ -73,12 +78,15 @@ jobs: steps: - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 - - name: Install lsb-release + # - name: Install lsb-release + # run: | + # sudo apt-get update + # sudo apt-get install -y --no-install-recommends lsb-release + - name: Clear Python cache on ml-build container run: | - sudo apt-get update - sudo apt-get install -y --no-install-recommends lsb-release - - name: Configure pip not to print irrelevant error about running as root - run: echo "PIP_ROOT_USER_ACTION='ignore'" | sudo tee -a /etc/environment + sudo rm -rf /__w/Python + # - name: Configure pip not to print irrelevant error about running as root + # run: echo "PIP_ROOT_USER_ACTION='ignore'" | sudo tee -a /etc/environment - uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v5 with: python-version: '3.10' From 986072bf9639e0e79a78e9445ce61b80e7d30156 Mon Sep 17 00:00:00 2001 From: mhucka Date: Sun, 7 Dec 2025 05:22:46 +0000 Subject: [PATCH 19/34] Wrap up --- .github/workflows/ci-build-checks.yaml | 70 +++++++++++++------------- 1 file changed, 34 insertions(+), 36 deletions(-) diff --git a/.github/workflows/ci-build-checks.yaml b/.github/workflows/ci-build-checks.yaml index 1da93e852..e5aee7338 100644 --- a/.github/workflows/ci-build-checks.yaml +++ b/.github/workflows/ci-build-checks.yaml @@ -30,6 +30,10 @@ concurrency: permissions: read-all +env: + # Tell pip not to print error messages about running commands as root. + PIP_ROOT_USER_ACTION: ignore + jobs: wheel-build: name: Wheel test @@ -39,27 +43,24 @@ jobs: timeout-minutes: 60 steps: - - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 - - name: Install lsb-release (needed by setup-python) - run: | - sudo apt-get update - sudo apt-get install -y --no-install-recommends lsb-release - - name: Configure pip not to print irrelevant error about running as root + - name: Adjust the ml-build runner to our needs run: | + # lsb-release (needed by setup-python) is missing in ml-build runners + sudo apt-get update && sudo apt-get install -y lsb-release + # We need sudo to pass this environment variable to subprocesses. echo 'Defaults env_keep += "PIP_ROOT_USER_ACTION"' | \ sudo tee /etc/sudoers.d/pip-root-action > /dev/null sudo chmod 440 /etc/sudoers.d/pip-root-action + # This file, though it's empty, hangs the Bazel install step. + rm -f /etc/bazel.bazelrc + - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 - uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v5 - env: - PIP_ROOT_USER_ACTION: ignore with: python-version: '3.10' architecture: 'x64' cache: pip - name: Install Bazel on CI - run: | - rm -f /etc/bazel.bazelrc - ./scripts/ci_install.sh + run: ./scripts/ci_install.sh - name: Configure CI TF run: echo "Y\n" | ./configure.sh - name: Build Wheel Test @@ -73,29 +74,26 @@ jobs: container: image: us-docker.pkg.dev/ml-oss-artifacts-published/ml-public-container/ml-build:latest timeout-minutes: 60 - env: - PIP_ROOT_USER_ACTION: ignore steps: - - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 - # - name: Install lsb-release - # run: | - # sudo apt-get update - # sudo apt-get install -y --no-install-recommends lsb-release - - name: Clear Python cache on ml-build container + - name: Adjust the ml-build runner to our needs run: | - sudo rm -rf /__w/Python - # - name: Configure pip not to print irrelevant error about running as root - # run: echo "PIP_ROOT_USER_ACTION='ignore'" | sudo tee -a /etc/environment + # lsb-release (needed by setup-python) is missing in ml-build runners + sudo apt-get update && sudo apt-get install -y lsb-release + # We need sudo to pass this environment variable to subprocesses. + echo 'Defaults env_keep += "PIP_ROOT_USER_ACTION"' | \ + sudo tee /etc/sudoers.d/pip-root-action > /dev/null + sudo chmod 440 /etc/sudoers.d/pip-root-action + # This file, though it's empty, hangs the Bazel install step. + rm -f /etc/bazel.bazelrc + - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 - uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v5 with: python-version: '3.10' architecture: 'x64' cache: pip - name: Install Bazel on CI - run: | - rm -f /etc/bazel.bazelrc - ./scripts/ci_install.sh + run: ./scripts/ci_install.sh - name: Configure CI TF run: echo "Y\n" | ./configure.sh - name: Full Library Test @@ -130,17 +128,19 @@ jobs: image: us-docker.pkg.dev/ml-oss-artifacts-published/ml-public-container/ml-build:latest needs: wheel-build timeout-minutes: 60 - env: - PIP_ROOT_USER_ACTION: ignore steps: - - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 - - name: Install lsb-release + - name: Adjust the ml-build runner to our needs run: | - sudo apt-get update - sudo apt-get install -y --no-install-recommends lsb-release - - name: Configure pip not to print irrelevant error about running as root - run: echo "PIP_ROOT_USER_ACTION='ignore'" | sudo tee -a /etc/environment + # lsb-release (needed by setup-python) is missing in ml-build runners + sudo apt-get update && sudo apt-get install -y lsb-release + # We need sudo to pass this environment variable to subprocesses. + echo 'Defaults env_keep += "PIP_ROOT_USER_ACTION"' | \ + sudo tee /etc/sudoers.d/pip-root-action > /dev/null + sudo chmod 440 /etc/sudoers.d/pip-root-action + # This file, though it's empty, hangs the Bazel install step. + rm -f /etc/bazel.bazelrc + - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 - uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v5 with: python-version: '3.10' @@ -149,9 +149,7 @@ jobs: - name: Install notebook dependencies run: pip install --upgrade pip seaborn==0.10.0 - name: Install Bazel on CI - run: | - rm -f /etc/bazel.bazelrc - ./scripts/ci_install.sh + run: ./scripts/ci_install.sh - name: Configure CI TF run: echo "Y\n" | ./configure.sh - name: Build Wheel From 519fdab6a98efc69deb42fb297f9afc78d5406dc Mon Sep 17 00:00:00 2001 From: mhucka Date: Sun, 7 Dec 2025 05:41:13 +0000 Subject: [PATCH 20/34] Try sharding the tutorial tests --- .github/workflows/ci-build-checks.yaml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci-build-checks.yaml b/.github/workflows/ci-build-checks.yaml index e5aee7338..4306e1da3 100644 --- a/.github/workflows/ci-build-checks.yaml +++ b/.github/workflows/ci-build-checks.yaml @@ -122,12 +122,16 @@ jobs: # run: ./scripts/msan_test.sh tutorials-test: - name: Tutorial tests + name: Tutorial tests (shard ${{matrix.shard + 1 }}) runs-on: linux-x86-n2-32 container: image: us-docker.pkg.dev/ml-oss-artifacts-published/ml-public-container/ml-build:latest needs: wheel-build timeout-minutes: 60 + strategy: + fail-fast: false + matrix: + shard: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] steps: - name: Adjust the ml-build runner to our needs @@ -155,4 +159,8 @@ jobs: - name: Build Wheel run: ./scripts/build_pip_package_test.sh - name: Test Notebooks + # These env. vars. are used by absl-py to run tests in parallel. + env: + TEST_TOTAL_SHARDS: 9 + TEST_SHARD_INDEX: ${{matrix.shard}} run: ./scripts/ci_validate_tutorials.sh From 8d273106df77494523b572fe5e1952753792cb66 Mon Sep 17 00:00:00 2001 From: mhucka Date: Sun, 7 Dec 2025 05:41:47 +0000 Subject: [PATCH 21/34] Fix syntax error --- .github/workflows/ci-build-checks.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-build-checks.yaml b/.github/workflows/ci-build-checks.yaml index 4306e1da3..3e6e113b3 100644 --- a/.github/workflows/ci-build-checks.yaml +++ b/.github/workflows/ci-build-checks.yaml @@ -122,7 +122,7 @@ jobs: # run: ./scripts/msan_test.sh tutorials-test: - name: Tutorial tests (shard ${{matrix.shard + 1 }}) + name: Tutorial tests (shard ${{matrix.shard}}) runs-on: linux-x86-n2-32 container: image: us-docker.pkg.dev/ml-oss-artifacts-published/ml-public-container/ml-build:latest From 8483a9f09b430dfbeb26daf394748e5975ac0905 Mon Sep 17 00:00:00 2001 From: mhucka Date: Sun, 7 Dec 2025 05:47:05 +0000 Subject: [PATCH 22/34] Try yet another way --- .github/workflows/ci-build-checks.yaml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci-build-checks.yaml b/.github/workflows/ci-build-checks.yaml index 3e6e113b3..99ca46909 100644 --- a/.github/workflows/ci-build-checks.yaml +++ b/.github/workflows/ci-build-checks.yaml @@ -48,9 +48,7 @@ jobs: # lsb-release (needed by setup-python) is missing in ml-build runners sudo apt-get update && sudo apt-get install -y lsb-release # We need sudo to pass this environment variable to subprocesses. - echo 'Defaults env_keep += "PIP_ROOT_USER_ACTION"' | \ - sudo tee /etc/sudoers.d/pip-root-action > /dev/null - sudo chmod 440 /etc/sudoers.d/pip-root-action + echo -e "[global]\nroot-user-action = ignore" | sudo tee /etc/pip.conf > /dev/null # This file, though it's empty, hangs the Bazel install step. rm -f /etc/bazel.bazelrc - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 @@ -122,7 +120,7 @@ jobs: # run: ./scripts/msan_test.sh tutorials-test: - name: Tutorial tests (shard ${{matrix.shard}}) + name: Tutorial tests runs-on: linux-x86-n2-32 container: image: us-docker.pkg.dev/ml-oss-artifacts-published/ml-public-container/ml-build:latest From ace37aebba864c4491c821e8f23d2e2a9a9f3d7a Mon Sep 17 00:00:00 2001 From: mhucka Date: Sun, 7 Dec 2025 06:02:07 +0000 Subject: [PATCH 23/34] Try different sharding --- .github/workflows/ci-build-checks.yaml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci-build-checks.yaml b/.github/workflows/ci-build-checks.yaml index 99ca46909..43acae1bc 100644 --- a/.github/workflows/ci-build-checks.yaml +++ b/.github/workflows/ci-build-checks.yaml @@ -121,15 +121,16 @@ jobs: tutorials-test: name: Tutorial tests - runs-on: linux-x86-n2-32 - container: - image: us-docker.pkg.dev/ml-oss-artifacts-published/ml-public-container/ml-build:latest + runs-on: ubuntu-22.04 needs: wheel-build timeout-minutes: 60 + # Run tutorial tests with parallelism via sharding supported by absl-py. strategy: fail-fast: false matrix: - shard: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] + shard: [0, 1, 2, 3, 4, 5, 6, 7, 8] + env: + TEST_TOTAL_SHARDS: 9 steps: - name: Adjust the ml-build runner to our needs @@ -157,8 +158,7 @@ jobs: - name: Build Wheel run: ./scripts/build_pip_package_test.sh - name: Test Notebooks - # These env. vars. are used by absl-py to run tests in parallel. env: - TEST_TOTAL_SHARDS: 9 + # Environment var. used by absl-py to run tests in parallel. TEST_SHARD_INDEX: ${{matrix.shard}} run: ./scripts/ci_validate_tutorials.sh From b0ceeff23bc98ca94b331041042cb68723c46a96 Mon Sep 17 00:00:00 2001 From: mhucka Date: Sun, 7 Dec 2025 06:08:24 +0000 Subject: [PATCH 24/34] test --- .github/workflows/ci-build-checks.yaml | 197 +++++++++++++------------ 1 file changed, 101 insertions(+), 96 deletions(-) diff --git a/.github/workflows/ci-build-checks.yaml b/.github/workflows/ci-build-checks.yaml index 43acae1bc..54438eff5 100644 --- a/.github/workflows/ci-build-checks.yaml +++ b/.github/workflows/ci-build-checks.yaml @@ -47,8 +47,13 @@ jobs: run: | # lsb-release (needed by setup-python) is missing in ml-build runners sudo apt-get update && sudo apt-get install -y lsb-release - # We need sudo to pass this environment variable to subprocesses. - echo -e "[global]\nroot-user-action = ignore" | sudo tee /etc/pip.conf > /dev/null + # Pass PIP_ROOT_USER_ACTION to pip inside sudo action in setup-python + printf 'Defaults env_keep += "PIP_ROOT_USER_ACTION"' | \ + sudo tee -a /etc/sudoers > /dev/null + printf 'PIP_ROOT_USER_ACTION=ignore' | \ + sudo tee -a /etc/environment > /dev/null + printf "[global]\nroot-user-action = ignore" | \ + sudo tee /etc/pip.conf > /dev/null # This file, though it's empty, hangs the Bazel install step. rm -f /etc/bazel.bazelrc - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 @@ -57,108 +62,108 @@ jobs: python-version: '3.10' architecture: 'x64' cache: pip - - name: Install Bazel on CI - run: ./scripts/ci_install.sh - - name: Configure CI TF - run: echo "Y\n" | ./configure.sh - - name: Build Wheel Test - run: ./scripts/build_pip_package_test.sh - - name: Test Wheel - run: ./scripts/run_example.sh + # - name: Install Bazel on CI + # run: ./scripts/ci_install.sh + # - name: Configure CI TF + # run: printf "Y\n" | ./configure.sh + # - name: Build Wheel Test + # run: ./scripts/build_pip_package_test.sh + # - name: Test Wheel + # run: ./scripts/run_example.sh - bazel-tests: - name: Library tests - runs-on: linux-x86-n2-32 - container: - image: us-docker.pkg.dev/ml-oss-artifacts-published/ml-public-container/ml-build:latest - timeout-minutes: 60 + # bazel-tests: + # name: Library tests + # runs-on: linux-x86-n2-32 + # container: + # image: us-docker.pkg.dev/ml-oss-artifacts-published/ml-public-container/ml-build:latest + # timeout-minutes: 60 - steps: - - name: Adjust the ml-build runner to our needs - run: | - # lsb-release (needed by setup-python) is missing in ml-build runners - sudo apt-get update && sudo apt-get install -y lsb-release - # We need sudo to pass this environment variable to subprocesses. - echo 'Defaults env_keep += "PIP_ROOT_USER_ACTION"' | \ - sudo tee /etc/sudoers.d/pip-root-action > /dev/null - sudo chmod 440 /etc/sudoers.d/pip-root-action - # This file, though it's empty, hangs the Bazel install step. - rm -f /etc/bazel.bazelrc - - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 - - uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v5 - with: - python-version: '3.10' - architecture: 'x64' - cache: pip - - name: Install Bazel on CI - run: ./scripts/ci_install.sh - - name: Configure CI TF - run: echo "Y\n" | ./configure.sh - - name: Full Library Test - run: ./scripts/test_all.sh - - # 2024-11-30 [mhucka] temporarily turning off leak-tests because it produces - # false positives on GH that we can't immediately address. TODO: if updating - # TFQ to use Clang and the latest TF does not resolve this, find a way to - # skip the handful of failing tests and renable the rest of the msan tests. - # - # leak-tests: - # name: Memory Leak tests - # runs-on: ubuntu-22.04 - # # steps: - # - uses: actions/checkout@v1 - # - uses: actions/setup-python@v1 + # - name: Adjust the ml-build runner to our needs + # run: | + # # lsb-release (needed by setup-python) is missing in ml-build runners + # sudo apt-get update && sudo apt-get install -y lsb-release + # # We need sudo to pass this environment variable to subprocesses. + # printf 'Defaults env_keep += "PIP_ROOT_USER_ACTION"' | \ + # sudo tee /etc/sudoers.d/pip-root-action > /dev/null + # sudo chmod 440 /etc/sudoers.d/pip-root-action + # # This file, though it's empty, hangs the Bazel install step. + # rm -f /etc/bazel.bazelrc + # - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 + # - uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v5 # with: # python-version: '3.10' # architecture: 'x64' + # cache: pip # - name: Install Bazel on CI # run: ./scripts/ci_install.sh # - name: Configure CI TF - # run: echo "Y\n" | ./configure.sh - # - name: Leak Test qsim and src - # run: ./scripts/msan_test.sh + # run: printf "Y\n" | ./configure.sh + # - name: Full Library Test + # run: ./scripts/test_all.sh - tutorials-test: - name: Tutorial tests - runs-on: ubuntu-22.04 - needs: wheel-build - timeout-minutes: 60 - # Run tutorial tests with parallelism via sharding supported by absl-py. - strategy: - fail-fast: false - matrix: - shard: [0, 1, 2, 3, 4, 5, 6, 7, 8] - env: - TEST_TOTAL_SHARDS: 9 + # # 2024-11-30 [mhucka] temporarily turning off leak-tests because it produces + # # false positives on GH that we can't immediately address. TODO: if updating + # # TFQ to use Clang and the latest TF does not resolve this, find a way to + # # skip the handful of failing tests and renable the rest of the msan tests. + # # + # # leak-tests: + # # name: Memory Leak tests + # # runs-on: ubuntu-22.04 + # # + # # steps: + # # - uses: actions/checkout@v1 + # # - uses: actions/setup-python@v1 + # # with: + # # python-version: '3.10' + # # architecture: 'x64' + # # - name: Install Bazel on CI + # # run: ./scripts/ci_install.sh + # # - name: Configure CI TF + # # run: printf "Y\n" | ./configure.sh + # # - name: Leak Test qsim and src + # # run: ./scripts/msan_test.sh - steps: - - name: Adjust the ml-build runner to our needs - run: | - # lsb-release (needed by setup-python) is missing in ml-build runners - sudo apt-get update && sudo apt-get install -y lsb-release - # We need sudo to pass this environment variable to subprocesses. - echo 'Defaults env_keep += "PIP_ROOT_USER_ACTION"' | \ - sudo tee /etc/sudoers.d/pip-root-action > /dev/null - sudo chmod 440 /etc/sudoers.d/pip-root-action - # This file, though it's empty, hangs the Bazel install step. - rm -f /etc/bazel.bazelrc - - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 - - uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v5 - with: - python-version: '3.10' - architecture: 'x64' - cache: pip - - name: Install notebook dependencies - run: pip install --upgrade pip seaborn==0.10.0 - - name: Install Bazel on CI - run: ./scripts/ci_install.sh - - name: Configure CI TF - run: echo "Y\n" | ./configure.sh - - name: Build Wheel - run: ./scripts/build_pip_package_test.sh - - name: Test Notebooks - env: - # Environment var. used by absl-py to run tests in parallel. - TEST_SHARD_INDEX: ${{matrix.shard}} - run: ./scripts/ci_validate_tutorials.sh + # tutorials-test: + # name: Tutorial tests + # runs-on: ubuntu-22.04 + # needs: wheel-build + # timeout-minutes: 60 + # # Run tutorial tests with parallelism via sharding supported by absl-py. + # strategy: + # fail-fast: false + # matrix: + # shard: [0, 1, 2, 3, 4, 5, 6, 7, 8] + # env: + # TEST_TOTAL_SHARDS: 9 + + # steps: + # - name: Adjust the ml-build runner to our needs + # run: | + # # lsb-release (needed by setup-python) is missing in ml-build runners + # sudo apt-get update && sudo apt-get install -y lsb-release + # # We need sudo to pass this environment variable to subprocesses. + # printf 'Defaults env_keep += "PIP_ROOT_USER_ACTION"' | \ + # sudo tee /etc/sudoers.d/pip-root-action > /dev/null + # sudo chmod 440 /etc/sudoers.d/pip-root-action + # # This file, though it's empty, hangs the Bazel install step. + # rm -f /etc/bazel.bazelrc + # - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 + # - uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v5 + # with: + # python-version: '3.10' + # architecture: 'x64' + # cache: pip + # - name: Install notebook dependencies + # run: pip install --upgrade pip seaborn==0.10.0 + # - name: Install Bazel on CI + # run: ./scripts/ci_install.sh + # - name: Configure CI TF + # run: printf "Y\n" | ./configure.sh + # - name: Build Wheel + # run: ./scripts/build_pip_package_test.sh + # - name: Test Notebooks + # env: + # # Environment var. used by absl-py to run tests in parallel. + # TEST_SHARD_INDEX: ${{matrix.shard}} + # run: ./scripts/ci_validate_tutorials.sh From f672e284d23d40bed923e76912fc8d3f421ea7e9 Mon Sep 17 00:00:00 2001 From: mhucka Date: Sun, 7 Dec 2025 06:11:23 +0000 Subject: [PATCH 25/34] Yet another test --- .github/workflows/ci-build-checks.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci-build-checks.yaml b/.github/workflows/ci-build-checks.yaml index 54438eff5..7945accc2 100644 --- a/.github/workflows/ci-build-checks.yaml +++ b/.github/workflows/ci-build-checks.yaml @@ -30,10 +30,6 @@ concurrency: permissions: read-all -env: - # Tell pip not to print error messages about running commands as root. - PIP_ROOT_USER_ACTION: ignore - jobs: wheel-build: name: Wheel test @@ -62,6 +58,10 @@ jobs: python-version: '3.10' architecture: 'x64' cache: pip + env: + # Tell pip not to print error messages about running commands as root + PIP_ROOT_USER_ACTION: ignore + # - name: Install Bazel on CI # run: ./scripts/ci_install.sh # - name: Configure CI TF From d0954d21cf1058795d21e5aa1489b5cc72a9fc41 Mon Sep 17 00:00:00 2001 From: mhucka Date: Sun, 7 Dec 2025 06:15:11 +0000 Subject: [PATCH 26/34] Yet another test --- .github/workflows/ci-build-checks.yaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci-build-checks.yaml b/.github/workflows/ci-build-checks.yaml index 7945accc2..11dd80e9f 100644 --- a/.github/workflows/ci-build-checks.yaml +++ b/.github/workflows/ci-build-checks.yaml @@ -49,7 +49,11 @@ jobs: printf 'PIP_ROOT_USER_ACTION=ignore' | \ sudo tee -a /etc/environment > /dev/null printf "[global]\nroot-user-action = ignore" | \ - sudo tee /etc/pip.conf > /dev/null + sudo tee -a /etc/pip.conf > /dev/null + + sudo mkdir -p /root/.config/pip + printf "[global]\nroot-user-action = ignore\n" | sudo tee /root/.config/pip/pip.conf > /dev/null + # This file, though it's empty, hangs the Bazel install step. rm -f /etc/bazel.bazelrc - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 From b9f2b56116c0b90cbd8043e6a351bfa52fa504e6 Mon Sep 17 00:00:00 2001 From: mhucka Date: Sun, 7 Dec 2025 06:17:40 +0000 Subject: [PATCH 27/34] test order --- .github/workflows/ci-build-checks.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci-build-checks.yaml b/.github/workflows/ci-build-checks.yaml index 11dd80e9f..c8636220b 100644 --- a/.github/workflows/ci-build-checks.yaml +++ b/.github/workflows/ci-build-checks.yaml @@ -39,6 +39,8 @@ jobs: timeout-minutes: 60 steps: + - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 + - name: Adjust the ml-build runner to our needs run: | # lsb-release (needed by setup-python) is missing in ml-build runners @@ -56,7 +58,6 @@ jobs: # This file, though it's empty, hangs the Bazel install step. rm -f /etc/bazel.bazelrc - - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 - uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v5 with: python-version: '3.10' From 5568968d9765f8f0576f195a63bb959c6e98a26a Mon Sep 17 00:00:00 2001 From: mhucka Date: Sun, 7 Dec 2025 06:29:35 +0000 Subject: [PATCH 28/34] Give up --- .github/workflows/ci-build-checks.yaml | 196 +++++++++++-------------- 1 file changed, 86 insertions(+), 110 deletions(-) diff --git a/.github/workflows/ci-build-checks.yaml b/.github/workflows/ci-build-checks.yaml index c8636220b..83565d8b8 100644 --- a/.github/workflows/ci-build-checks.yaml +++ b/.github/workflows/ci-build-checks.yaml @@ -39,136 +39,112 @@ jobs: timeout-minutes: 60 steps: + - name: Adjust the ml-build runner to our needs + run: | + # lsb-release (needed by setup-python) is missing in ml-build runners + sudo apt-get update && sudo apt-get install -y lsb-release + # This file, though it's empty, hangs the Bazel install step. + rm -f /etc/bazel.bazelrc - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 + - uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v5 + with: + python-version: '3.10' + architecture: 'x64' + cache: pip + - name: Install Bazel on CI + run: ./scripts/ci_install.sh + - name: Configure CI TF + run: printf "Y\n" | ./configure.sh + - name: Build Wheel Test + run: ./scripts/build_pip_package_test.sh + - name: Test Wheel + run: ./scripts/run_example.sh + + bazel-tests: + name: Library tests + runs-on: linux-x86-n2-32 + container: + image: us-docker.pkg.dev/ml-oss-artifacts-published/ml-public-container/ml-build:latest + timeout-minutes: 60 + steps: - name: Adjust the ml-build runner to our needs run: | # lsb-release (needed by setup-python) is missing in ml-build runners sudo apt-get update && sudo apt-get install -y lsb-release - # Pass PIP_ROOT_USER_ACTION to pip inside sudo action in setup-python - printf 'Defaults env_keep += "PIP_ROOT_USER_ACTION"' | \ - sudo tee -a /etc/sudoers > /dev/null - printf 'PIP_ROOT_USER_ACTION=ignore' | \ - sudo tee -a /etc/environment > /dev/null - printf "[global]\nroot-user-action = ignore" | \ - sudo tee -a /etc/pip.conf > /dev/null - - sudo mkdir -p /root/.config/pip - printf "[global]\nroot-user-action = ignore\n" | sudo tee /root/.config/pip/pip.conf > /dev/null - # This file, though it's empty, hangs the Bazel install step. rm -f /etc/bazel.bazelrc + - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 - uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v5 with: python-version: '3.10' architecture: 'x64' cache: pip - env: - # Tell pip not to print error messages about running commands as root - PIP_ROOT_USER_ACTION: ignore - - # - name: Install Bazel on CI - # run: ./scripts/ci_install.sh - # - name: Configure CI TF - # run: printf "Y\n" | ./configure.sh - # - name: Build Wheel Test - # run: ./scripts/build_pip_package_test.sh - # - name: Test Wheel - # run: ./scripts/run_example.sh - - # bazel-tests: - # name: Library tests - # runs-on: linux-x86-n2-32 - # container: - # image: us-docker.pkg.dev/ml-oss-artifacts-published/ml-public-container/ml-build:latest - # timeout-minutes: 60 - + - name: Install Bazel on CI + run: ./scripts/ci_install.sh + - name: Configure CI TF + run: printf "Y\n" | ./configure.sh + - name: Full Library Test + run: ./scripts/test_all.sh + + # 2024-11-30 [mhucka] temporarily turning off leak-tests because it produces + # false positives on GH that we can't immediately address. TODO: if updating + # TFQ to use Clang and the latest TF does not resolve this, find a way to + # skip the handful of failing tests and renable the rest of the msan tests. + # + # leak-tests: + # name: Memory Leak tests + # runs-on: ubuntu-22.04 + # # steps: - # - name: Adjust the ml-build runner to our needs - # run: | - # # lsb-release (needed by setup-python) is missing in ml-build runners - # sudo apt-get update && sudo apt-get install -y lsb-release - # # We need sudo to pass this environment variable to subprocesses. - # printf 'Defaults env_keep += "PIP_ROOT_USER_ACTION"' | \ - # sudo tee /etc/sudoers.d/pip-root-action > /dev/null - # sudo chmod 440 /etc/sudoers.d/pip-root-action - # # This file, though it's empty, hangs the Bazel install step. - # rm -f /etc/bazel.bazelrc - # - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 - # - uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v5 + # - uses: actions/checkout@v1 + # - uses: actions/setup-python@v1 # with: # python-version: '3.10' # architecture: 'x64' - # cache: pip # - name: Install Bazel on CI # run: ./scripts/ci_install.sh # - name: Configure CI TF # run: printf "Y\n" | ./configure.sh - # - name: Full Library Test - # run: ./scripts/test_all.sh - - # # 2024-11-30 [mhucka] temporarily turning off leak-tests because it produces - # # false positives on GH that we can't immediately address. TODO: if updating - # # TFQ to use Clang and the latest TF does not resolve this, find a way to - # # skip the handful of failing tests and renable the rest of the msan tests. - # # - # # leak-tests: - # # name: Memory Leak tests - # # runs-on: ubuntu-22.04 - # # - # # steps: - # # - uses: actions/checkout@v1 - # # - uses: actions/setup-python@v1 - # # with: - # # python-version: '3.10' - # # architecture: 'x64' - # # - name: Install Bazel on CI - # # run: ./scripts/ci_install.sh - # # - name: Configure CI TF - # # run: printf "Y\n" | ./configure.sh - # # - name: Leak Test qsim and src - # # run: ./scripts/msan_test.sh + # - name: Leak Test qsim and src + # run: ./scripts/msan_test.sh - # tutorials-test: - # name: Tutorial tests - # runs-on: ubuntu-22.04 - # needs: wheel-build - # timeout-minutes: 60 - # # Run tutorial tests with parallelism via sharding supported by absl-py. - # strategy: - # fail-fast: false - # matrix: - # shard: [0, 1, 2, 3, 4, 5, 6, 7, 8] - # env: - # TEST_TOTAL_SHARDS: 9 + tutorials-test: + name: Tutorial tests + runs-on: ubuntu-22.04 + needs: wheel-build + timeout-minutes: 60 + # Run tutorial tests with parallelism via sharding supported by absl-py. + strategy: + fail-fast: false + matrix: + shard: [0, 1, 2, 3, 4, 5, 6, 7, 8] + env: + TEST_TOTAL_SHARDS: 9 - # steps: - # - name: Adjust the ml-build runner to our needs - # run: | - # # lsb-release (needed by setup-python) is missing in ml-build runners - # sudo apt-get update && sudo apt-get install -y lsb-release - # # We need sudo to pass this environment variable to subprocesses. - # printf 'Defaults env_keep += "PIP_ROOT_USER_ACTION"' | \ - # sudo tee /etc/sudoers.d/pip-root-action > /dev/null - # sudo chmod 440 /etc/sudoers.d/pip-root-action - # # This file, though it's empty, hangs the Bazel install step. - # rm -f /etc/bazel.bazelrc - # - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 - # - uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v5 - # with: - # python-version: '3.10' - # architecture: 'x64' - # cache: pip - # - name: Install notebook dependencies - # run: pip install --upgrade pip seaborn==0.10.0 - # - name: Install Bazel on CI - # run: ./scripts/ci_install.sh - # - name: Configure CI TF - # run: printf "Y\n" | ./configure.sh - # - name: Build Wheel - # run: ./scripts/build_pip_package_test.sh - # - name: Test Notebooks - # env: - # # Environment var. used by absl-py to run tests in parallel. - # TEST_SHARD_INDEX: ${{matrix.shard}} - # run: ./scripts/ci_validate_tutorials.sh + steps: + - name: Adjust the ml-build runner to our needs + run: | + # lsb-release (needed by setup-python) is missing in ml-build runners + sudo apt-get update && sudo apt-get install -y lsb-release + # This file, though it's empty, hangs the Bazel install step. + rm -f /etc/bazel.bazelrc + - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 + - uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v5 + with: + python-version: '3.10' + architecture: 'x64' + cache: pip + - name: Install notebook dependencies + run: pip install --upgrade pip seaborn==0.10.0 + - name: Install Bazel on CI + run: ./scripts/ci_install.sh + - name: Configure CI TF + run: printf "Y\n" | ./configure.sh + - name: Build Wheel + run: ./scripts/build_pip_package_test.sh + - name: Test Notebooks + env: + # Environment var. used by absl-py to run tests in parallel. + TEST_SHARD_INDEX: ${{matrix.shard}} + run: ./scripts/ci_validate_tutorials.sh From 9794cae1887a0d3782111c095c516e2a01a8a357 Mon Sep 17 00:00:00 2001 From: mhucka Date: Sun, 7 Dec 2025 06:50:17 +0000 Subject: [PATCH 29/34] Try different parallelism approach --- .github/workflows/ci-build-checks.yaml | 135 +++++++++++++------------ 1 file changed, 71 insertions(+), 64 deletions(-) diff --git a/.github/workflows/ci-build-checks.yaml b/.github/workflows/ci-build-checks.yaml index 83565d8b8..e21e5cd4e 100644 --- a/.github/workflows/ci-build-checks.yaml +++ b/.github/workflows/ci-build-checks.yaml @@ -31,61 +31,61 @@ concurrency: permissions: read-all jobs: - wheel-build: - name: Wheel test - runs-on: linux-x86-n2-32 - container: - image: us-docker.pkg.dev/ml-oss-artifacts-published/ml-public-container/ml-build:latest - timeout-minutes: 60 + # wheel-build: + # name: Wheel test + # runs-on: linux-x86-n2-32 + # container: + # image: us-docker.pkg.dev/ml-oss-artifacts-published/ml-public-container/ml-build:latest + # timeout-minutes: 60 - steps: - - name: Adjust the ml-build runner to our needs - run: | - # lsb-release (needed by setup-python) is missing in ml-build runners - sudo apt-get update && sudo apt-get install -y lsb-release - # This file, though it's empty, hangs the Bazel install step. - rm -f /etc/bazel.bazelrc - - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 - - uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v5 - with: - python-version: '3.10' - architecture: 'x64' - cache: pip - - name: Install Bazel on CI - run: ./scripts/ci_install.sh - - name: Configure CI TF - run: printf "Y\n" | ./configure.sh - - name: Build Wheel Test - run: ./scripts/build_pip_package_test.sh - - name: Test Wheel - run: ./scripts/run_example.sh + # steps: + # - name: Adjust the ml-build runner to our needs + # run: | + # # lsb-release (needed by setup-python) is missing in ml-build runners + # sudo apt-get update && sudo apt-get install -y lsb-release + # # This file, though it's empty, hangs the Bazel install step. + # rm -f /etc/bazel.bazelrc + # - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 + # - uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v5 + # with: + # python-version: '3.10' + # architecture: 'x64' + # cache: pip + # - name: Install Bazel on CI + # run: ./scripts/ci_install.sh + # - name: Configure CI TF + # run: printf "Y\n" | ./configure.sh + # - name: Build Wheel Test + # run: ./scripts/build_pip_package_test.sh + # - name: Test Wheel + # run: ./scripts/run_example.sh - bazel-tests: - name: Library tests - runs-on: linux-x86-n2-32 - container: - image: us-docker.pkg.dev/ml-oss-artifacts-published/ml-public-container/ml-build:latest - timeout-minutes: 60 + # bazel-tests: + # name: Library tests + # runs-on: linux-x86-n2-32 + # container: + # image: us-docker.pkg.dev/ml-oss-artifacts-published/ml-public-container/ml-build:latest + # timeout-minutes: 60 - steps: - - name: Adjust the ml-build runner to our needs - run: | - # lsb-release (needed by setup-python) is missing in ml-build runners - sudo apt-get update && sudo apt-get install -y lsb-release - # This file, though it's empty, hangs the Bazel install step. - rm -f /etc/bazel.bazelrc - - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 - - uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v5 - with: - python-version: '3.10' - architecture: 'x64' - cache: pip - - name: Install Bazel on CI - run: ./scripts/ci_install.sh - - name: Configure CI TF - run: printf "Y\n" | ./configure.sh - - name: Full Library Test - run: ./scripts/test_all.sh + # steps: + # - name: Adjust the ml-build runner to our needs + # run: | + # # lsb-release (needed by setup-python) is missing in ml-build runners + # sudo apt-get update && sudo apt-get install -y lsb-release + # # This file, though it's empty, hangs the Bazel install step. + # rm -f /etc/bazel.bazelrc + # - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 + # - uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v5 + # with: + # python-version: '3.10' + # architecture: 'x64' + # cache: pip + # - name: Install Bazel on CI + # run: ./scripts/ci_install.sh + # - name: Configure CI TF + # run: printf "Y\n" | ./configure.sh + # - name: Full Library Test + # run: ./scripts/test_all.sh # 2024-11-30 [mhucka] temporarily turning off leak-tests because it produces # false positives on GH that we can't immediately address. TODO: if updating @@ -112,15 +112,8 @@ jobs: tutorials-test: name: Tutorial tests runs-on: ubuntu-22.04 - needs: wheel-build + # needs: wheel-build timeout-minutes: 60 - # Run tutorial tests with parallelism via sharding supported by absl-py. - strategy: - fail-fast: false - matrix: - shard: [0, 1, 2, 3, 4, 5, 6, 7, 8] - env: - TEST_TOTAL_SHARDS: 9 steps: - name: Adjust the ml-build runner to our needs @@ -143,8 +136,22 @@ jobs: run: printf "Y\n" | ./configure.sh - name: Build Wheel run: ./scripts/build_pip_package_test.sh + # - name: Test Notebooks + # env: + # # Environment var. used by absl-py to run tests in parallel. + # TEST_SHARD_INDEX: ${{matrix.shard}} + # run: ./scripts/ci_validate_tutorials.sh + - name: Test Notebooks - env: - # Environment var. used by absl-py to run tests in parallel. - TEST_SHARD_INDEX: ${{matrix.shard}} - run: ./scripts/ci_validate_tutorials.sh + run: | + TOTAL_NB=$(find docs/tutorials/ -maxdepth 1 -name "*.ipynb" | wc -l) + export TEST_TOTAL_SHARDS=${TOTAL_NB} + # Use GNU Parallel to run the test script for each shard. + # The job will fail if any of the shards fail. + seq 0 $((TOTAL_NB - 1)) | parallel \ + --jobs "${TOTAL_NB}" \ + --halt-on-error 2 \ + --line-buffer \ + --tag \ + --env TEST_TOTAL_SHARDS \ + 'TEST_SHARD_INDEX={} ./scripts/ci_validate_tutorials.sh' From 3c420395fbaedb829eec2143d51aa5f3fee8d3e6 Mon Sep 17 00:00:00 2001 From: mhucka Date: Sun, 7 Dec 2025 07:12:32 +0000 Subject: [PATCH 30/34] Install updated dependencies --- .github/workflows/ci-build-checks.yaml | 51 +++++++++++++------------- 1 file changed, 25 insertions(+), 26 deletions(-) diff --git a/.github/workflows/ci-build-checks.yaml b/.github/workflows/ci-build-checks.yaml index e21e5cd4e..4425e5f86 100644 --- a/.github/workflows/ci-build-checks.yaml +++ b/.github/workflows/ci-build-checks.yaml @@ -38,27 +38,25 @@ jobs: # image: us-docker.pkg.dev/ml-oss-artifacts-published/ml-public-container/ml-build:latest # timeout-minutes: 60 - # steps: - # - name: Adjust the ml-build runner to our needs - # run: | - # # lsb-release (needed by setup-python) is missing in ml-build runners - # sudo apt-get update && sudo apt-get install -y lsb-release - # # This file, though it's empty, hangs the Bazel install step. - # rm -f /etc/bazel.bazelrc - # - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 - # - uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v5 - # with: - # python-version: '3.10' - # architecture: 'x64' - # cache: pip - # - name: Install Bazel on CI - # run: ./scripts/ci_install.sh - # - name: Configure CI TF - # run: printf "Y\n" | ./configure.sh - # - name: Build Wheel Test - # run: ./scripts/build_pip_package_test.sh - # - name: Test Wheel - # run: ./scripts/run_example.sh + # steps: + # - name: Adjust the ml-build runner to our needs + # run: | + # # lsb-release (needed by setup-python) is missing in ml-build runners + # sudo apt-get update && sudo apt-get install -y lsb-release + # # This file, though it's empty, hangs the Bazel install step. + # rm -f /etc/bazel.bazelrc + # - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 + # - uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v5 + # with: + # python-version: '3.10' + # architecture: 'x64' + # cache: pip + # - name: Install Bazel on CI + # run: ./scripts/ci_install.sh + # - name: Build & test wheel for TFQ + # run: ./scripts/build_pip_package_test.sh + # - name: Test Wheel + # run: ./scripts/run_example.sh # bazel-tests: # name: Library tests @@ -112,7 +110,6 @@ jobs: tutorials-test: name: Tutorial tests runs-on: ubuntu-22.04 - # needs: wheel-build timeout-minutes: 60 steps: @@ -128,13 +125,15 @@ jobs: python-version: '3.10' architecture: 'x64' cache: pip + - name: Install notebook dependencies - run: pip install --upgrade pip seaborn==0.10.0 + run: | + pip install --upgrade pip + pip install nbclient==0.6.5 jupyter-client==7.4.9 'ipython>=8.10.0' 'ipykernel>=6.29.0' gym~=0.24.1 seaborn~=0.12.0 tensorflow-docs + - name: Install Bazel on CI run: ./scripts/ci_install.sh - - name: Configure CI TF - run: printf "Y\n" | ./configure.sh - - name: Build Wheel + - name: Build TFQ Wheel run: ./scripts/build_pip_package_test.sh # - name: Test Notebooks # env: From 2a89c6c4d2a1ae98a14e4689c69667291639cb1c Mon Sep 17 00:00:00 2001 From: mhucka Date: Sun, 7 Dec 2025 07:17:42 +0000 Subject: [PATCH 31/34] Give up --- .github/workflows/ci-build-checks.yaml | 129 +++++++++++-------------- 1 file changed, 55 insertions(+), 74 deletions(-) diff --git a/.github/workflows/ci-build-checks.yaml b/.github/workflows/ci-build-checks.yaml index 4425e5f86..e6193eafa 100644 --- a/.github/workflows/ci-build-checks.yaml +++ b/.github/workflows/ci-build-checks.yaml @@ -31,59 +31,59 @@ concurrency: permissions: read-all jobs: - # wheel-build: - # name: Wheel test - # runs-on: linux-x86-n2-32 - # container: - # image: us-docker.pkg.dev/ml-oss-artifacts-published/ml-public-container/ml-build:latest - # timeout-minutes: 60 + wheel-build: + name: Wheel test + runs-on: linux-x86-n2-32 + container: + image: us-docker.pkg.dev/ml-oss-artifacts-published/ml-public-container/ml-build:latest + timeout-minutes: 60 - # steps: - # - name: Adjust the ml-build runner to our needs - # run: | - # # lsb-release (needed by setup-python) is missing in ml-build runners - # sudo apt-get update && sudo apt-get install -y lsb-release - # # This file, though it's empty, hangs the Bazel install step. - # rm -f /etc/bazel.bazelrc - # - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 - # - uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v5 - # with: - # python-version: '3.10' - # architecture: 'x64' - # cache: pip - # - name: Install Bazel on CI - # run: ./scripts/ci_install.sh - # - name: Build & test wheel for TFQ - # run: ./scripts/build_pip_package_test.sh - # - name: Test Wheel - # run: ./scripts/run_example.sh + steps: + - name: Adjust the ml-build runner to our needs + run: | + # lsb-release (needed by setup-python) is missing in ml-build runners + sudo apt-get update && sudo apt-get install -y lsb-release + # This file, though it's empty, hangs the Bazel install step. + rm -f /etc/bazel.bazelrc + - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 + - uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v5 + with: + python-version: '3.10' + architecture: 'x64' + cache: pip + - name: Install Bazel on CI + run: ./scripts/ci_install.sh + - name: Build & test wheel for TFQ + run: ./scripts/build_pip_package_test.sh + - name: Test Wheel + run: ./scripts/run_example.sh - # bazel-tests: - # name: Library tests - # runs-on: linux-x86-n2-32 - # container: - # image: us-docker.pkg.dev/ml-oss-artifacts-published/ml-public-container/ml-build:latest - # timeout-minutes: 60 + bazel-tests: + name: Library tests + runs-on: linux-x86-n2-32 + container: + image: us-docker.pkg.dev/ml-oss-artifacts-published/ml-public-container/ml-build:latest + timeout-minutes: 60 - # steps: - # - name: Adjust the ml-build runner to our needs - # run: | - # # lsb-release (needed by setup-python) is missing in ml-build runners - # sudo apt-get update && sudo apt-get install -y lsb-release - # # This file, though it's empty, hangs the Bazel install step. - # rm -f /etc/bazel.bazelrc - # - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 - # - uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v5 - # with: - # python-version: '3.10' - # architecture: 'x64' - # cache: pip - # - name: Install Bazel on CI - # run: ./scripts/ci_install.sh - # - name: Configure CI TF - # run: printf "Y\n" | ./configure.sh - # - name: Full Library Test - # run: ./scripts/test_all.sh + steps: + - name: Adjust the ml-build runner to our needs + run: | + # lsb-release (needed by setup-python) is missing in ml-build runners + sudo apt-get update && sudo apt-get install -y lsb-release + # This file, though it's empty, hangs the Bazel install step. + rm -f /etc/bazel.bazelrc + - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 + - uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v5 + with: + python-version: '3.10' + architecture: 'x64' + cache: pip + - name: Install Bazel on CI + run: ./scripts/ci_install.sh + - name: Configure CI TF + run: printf "Y\n" | ./configure.sh + - name: Full Library Test + run: ./scripts/test_all.sh # 2024-11-30 [mhucka] temporarily turning off leak-tests because it produces # false positives on GH that we can't immediately address. TODO: if updating @@ -109,7 +109,9 @@ jobs: tutorials-test: name: Tutorial tests - runs-on: ubuntu-22.04 + runs-on: linux-x86-n2-32 + container: + image: us-docker.pkg.dev/ml-oss-artifacts-published/ml-public-container/ml-build:latest timeout-minutes: 60 steps: @@ -125,32 +127,11 @@ jobs: python-version: '3.10' architecture: 'x64' cache: pip - - name: Install notebook dependencies - run: | - pip install --upgrade pip - pip install nbclient==0.6.5 jupyter-client==7.4.9 'ipython>=8.10.0' 'ipykernel>=6.29.0' gym~=0.24.1 seaborn~=0.12.0 tensorflow-docs - + run: pip install --upgrade pip seaborn==0.10.0 - name: Install Bazel on CI run: ./scripts/ci_install.sh - name: Build TFQ Wheel run: ./scripts/build_pip_package_test.sh - # - name: Test Notebooks - # env: - # # Environment var. used by absl-py to run tests in parallel. - # TEST_SHARD_INDEX: ${{matrix.shard}} - # run: ./scripts/ci_validate_tutorials.sh - - name: Test Notebooks - run: | - TOTAL_NB=$(find docs/tutorials/ -maxdepth 1 -name "*.ipynb" | wc -l) - export TEST_TOTAL_SHARDS=${TOTAL_NB} - # Use GNU Parallel to run the test script for each shard. - # The job will fail if any of the shards fail. - seq 0 $((TOTAL_NB - 1)) | parallel \ - --jobs "${TOTAL_NB}" \ - --halt-on-error 2 \ - --line-buffer \ - --tag \ - --env TEST_TOTAL_SHARDS \ - 'TEST_SHARD_INDEX={} ./scripts/ci_validate_tutorials.sh' + run: ./scripts/ci_validate_tutorials.sh From 2d5f5d152668c8529dc4b896d88e1841c09747fe Mon Sep 17 00:00:00 2001 From: mhucka Date: Sun, 7 Dec 2025 07:22:08 +0000 Subject: [PATCH 32/34] Don't need the big runner for the wheel test --- .github/workflows/ci-build-checks.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-build-checks.yaml b/.github/workflows/ci-build-checks.yaml index e6193eafa..be0693f49 100644 --- a/.github/workflows/ci-build-checks.yaml +++ b/.github/workflows/ci-build-checks.yaml @@ -33,7 +33,7 @@ permissions: read-all jobs: wheel-build: name: Wheel test - runs-on: linux-x86-n2-32 + runs-on: ubuntu-22.04 container: image: us-docker.pkg.dev/ml-oss-artifacts-published/ml-public-container/ml-build:latest timeout-minutes: 60 From b4cd7d8903d77e6bb55738838eb5d8dde6409aef Mon Sep 17 00:00:00 2001 From: mhucka Date: Sun, 7 Dec 2025 07:24:21 +0000 Subject: [PATCH 33/34] Remove left-over --- .github/workflows/ci-build-checks.yaml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/ci-build-checks.yaml b/.github/workflows/ci-build-checks.yaml index be0693f49..d97b167e4 100644 --- a/.github/workflows/ci-build-checks.yaml +++ b/.github/workflows/ci-build-checks.yaml @@ -34,8 +34,6 @@ jobs: wheel-build: name: Wheel test runs-on: ubuntu-22.04 - container: - image: us-docker.pkg.dev/ml-oss-artifacts-published/ml-public-container/ml-build:latest timeout-minutes: 60 steps: From 9573c824a0a3a2e6e1e9bef1f67846b4d1330b23 Mon Sep 17 00:00:00 2001 From: mhucka Date: Mon, 8 Dec 2025 04:53:44 +0000 Subject: [PATCH 34/34] Don't need to do the ml-build setup on regular runners --- .github/workflows/ci-build-checks.yaml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.github/workflows/ci-build-checks.yaml b/.github/workflows/ci-build-checks.yaml index d97b167e4..92c872dc6 100644 --- a/.github/workflows/ci-build-checks.yaml +++ b/.github/workflows/ci-build-checks.yaml @@ -37,12 +37,6 @@ jobs: timeout-minutes: 60 steps: - - name: Adjust the ml-build runner to our needs - run: | - # lsb-release (needed by setup-python) is missing in ml-build runners - sudo apt-get update && sudo apt-get install -y lsb-release - # This file, though it's empty, hangs the Bazel install step. - rm -f /etc/bazel.bazelrc - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 - uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v5 with: