Skip to content

Commit 2e2776a

Browse files
Merge pull request #2835 from AI-Hypercomputer:ci_tests
PiperOrigin-RevId: 845391296
2 parents 84f67ec + a30cbf5 commit 2e2776a

7 files changed

Lines changed: 65 additions & 358 deletions

File tree

.github/workflows/RunTests.yml

Lines changed: 0 additions & 262 deletions
This file was deleted.

.github/workflows/build_and_test_maxtext.yml

Lines changed: 37 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ permissions:
3737
contents: read
3838
jobs:
3939
build_and_upload_maxtext_package:
40-
name: Build and upload maxtext package
4140
uses: ./.github/workflows/build_package.yml
4241
with:
4342
device_type: tpu
@@ -101,6 +100,42 @@ jobs:
101100
container_resource_option: "--privileged"
102101
is_scheduled_run: ${{ github.event_name == 'schedule' }}
103102

103+
maxtext_tpu_pathways_unit_tests:
104+
needs: build_and_upload_maxtext_package
105+
uses: ./.github/workflows/run_pathways_tests.yml
106+
strategy:
107+
fail-fast: false
108+
matrix:
109+
image_type: ["py312"]
110+
with:
111+
device_type: tpu
112+
device_name: v4-8
113+
image_type: ${{ matrix.image_type }}
114+
cloud_runner: linux-x86-ct4p-240-4tpu
115+
pytest_marker: 'not cpu_only and not gpu_only and not integration_test'
116+
xla_python_client_mem_fraction: 0.75
117+
tf_force_gpu_allow_growth: false
118+
container_resource_option: "--privileged"
119+
is_scheduled_run: ${{ github.event_name == 'schedule' }}
120+
121+
maxtext_tpu_pathways_integration_tests:
122+
needs: build_and_upload_maxtext_package
123+
uses: ./.github/workflows/run_pathways_tests.yml
124+
strategy:
125+
fail-fast: false
126+
matrix:
127+
image_type: ["py312"]
128+
with:
129+
device_type: tpu
130+
device_name: v4-8
131+
image_type: ${{ matrix.image_type }}
132+
cloud_runner: linux-x86-ct4p-240-4tpu
133+
pytest_marker: 'not cpu_only and not gpu_only and integration_test'
134+
xla_python_client_mem_fraction: 0.75
135+
tf_force_gpu_allow_growth: false
136+
container_resource_option: "--privileged"
137+
is_scheduled_run: ${{ github.event_name == 'schedule' }}
138+
104139
maxtext_gpu_unit_tests:
105140
needs: build_and_upload_maxtext_package
106141
uses: ./.github/workflows/run_tests_against_package.yml
@@ -143,7 +178,7 @@ jobs:
143178

144179
notify_failure:
145180
name: Notify failed build # creates an issue or modifies last open existing issue for failed build
146-
needs: [maxtext_cpu_unit_tests, maxtext_tpu_unit_tests, maxtext_tpu_integration_tests, maxtext_gpu_unit_tests, maxtext_gpu_integration_tests]
181+
needs: [maxtext_cpu_unit_tests, maxtext_tpu_unit_tests, maxtext_tpu_integration_tests, maxtext_tpu_pathways_unit_tests, maxtext_tpu_pathways_integration_tests, maxtext_gpu_unit_tests, maxtext_gpu_integration_tests]
147182
if: ${{ always() }}
148183
runs-on: ubuntu-latest
149184
permissions:

.github/workflows/build_package.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ permissions:
3434
contents: read
3535
jobs:
3636
build_and_upload:
37-
name: Build and upload maxtext package (${{ inputs.device_name }})
3837
runs-on: ${{ inputs.cloud_runner != '' && inputs.cloud_runner || fromJson(format('["self-hosted", "{0}", "{1}"]', inputs.device_type, inputs.device_name)) }}
3938
container: python:3.12.3-slim-bullseye
4039
steps:

.github/workflows/run_pathways_tests_internal.yml renamed to .github/workflows/run_pathways_tests.yml

Lines changed: 27 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,14 @@ on:
5151
required: false
5252
type: string
5353

54+
permissions:
55+
contents: read
56+
5457
jobs:
5558
run:
5659
runs-on: ${{ inputs.cloud_runner != '' && inputs.cloud_runner || fromJson(format('["self-hosted", "{0}", "{1}"]', inputs.device_type, inputs.device_name)) }}
5760
container:
58-
image: gcr.io/tpu-prod-env-multipod/maxtext_${{ github.run_id }}:${{ inputs.image_type != '' && inputs.image_type || inputs.device_type }}
61+
image: gcr.io/tpu-prod-env-multipod/maxtext-unit-test-tpu:${{ inputs.image_type != '' && inputs.image_type }}
5962
env:
6063
XLA_PYTHON_CLIENT_MEM_FRACTION: ${{ inputs.xla_python_client_mem_fraction }}
6164
TF_FORCE_GPU_ALLOW_GROWTH: ${{ inputs.tf_force_gpu_allow_growth }}
@@ -64,18 +67,36 @@ jobs:
6467
JAX_BACKEND_TARGET: "grpc://localhost:29000"
6568
options: ${{ inputs.container_resource_option }}
6669
steps:
67-
- uses: actions/checkout@v4
68-
- name: Run
70+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
71+
- name: Download the maxtext wheel
72+
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0
73+
with:
74+
name: maxtext-wheel
75+
- name: Install the maxtext wheel
76+
shell: bash
77+
run: |
78+
python3 -m uv venv --seed
79+
source .venv/bin/activate
80+
maxtext_wheel=$(ls maxtext-*-py3-none-any.whl 2>/dev/null)
81+
uv pip install ${maxtext_wheel}[tpu] --resolution=lowest
82+
uv pip install -r src/install_maxtext_extra_deps/extra_deps_from_github.txt
83+
python3 --version
84+
python3 -m pip freeze
85+
- name: Copy test assets files
86+
run : gcloud storage cp gs://maxtext-test-assets/* src/MaxText/test_assets
87+
- name: Run Tests
6988
run: |
7089
if [ "${{ inputs.is_scheduled_run }}" = "true" ]; then
7190
FINAL_PYTEST_MARKER="${{ inputs.pytest_marker }}"
7291
else
7392
FINAL_PYTEST_MARKER="${{ inputs.pytest_marker }} and not scheduled_only"
7493
fi
75-
python3 -m pip install -e . --no-dependencies &&
76-
python3 -m pip uninstall -y libtpu &&
94+
export MAXTEXT_REPO_ROOT=$(pwd)
95+
export MAXTEXT_ASSETS_ROOT=$(pwd)/src/MaxText/assets
96+
export MAXTEXT_TEST_ASSETS_ROOT=$(pwd)/src/MaxText/test_assets
97+
export MAXTEXT_PKG_DIR=$(pwd)/src/MaxText
7798
# TODO(b/454659463): Enable test_default_hlo_match after volume mount is supported.
78-
python3 -m pytest ${{ inputs.pytest_addopts }} -v -m "${FINAL_PYTEST_MARKER}" -k "not AotHloIdenticalTest and not CompileThenLoad" --durations=0
99+
.venv/bin/python3 -m pytest ${{ inputs.pytest_addopts }} -v -m "${FINAL_PYTEST_MARKER}" -k "not AotHloIdenticalTest and not CompileThenLoad" --durations=0
79100
80101
services:
81102
resource_manager:

.github/workflows/run_tests_against_package.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,6 @@ jobs:
9090
python3 -m pip freeze
9191
- name: Copy test assets files
9292
run : gcloud storage cp gs://maxtext-test-assets/* src/MaxText/test_assets
93-
- name: Display contents of workspace # TODO: Remove
94-
run: ls -R
9593
- name: Run Tests
9694
shell: bash
9795
run: |

0 commit comments

Comments
 (0)