Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
104 commits
Select commit Hold shift + click to select a range
2e4bd3b
Add reward_functions_path + reward_functions CLI knobs for custom rew…
May 26, 2026
d866211
Setting up recipe for diloco.
Dr-Left Jun 30, 2026
a56309f
Fix soft cap in JAX Splash attention
huytransformer Jun 28, 2026
c479d48
Merge branch 'main' into htn/fix-jax-splash-soft-cap
huytransformer Jun 30, 2026
c926b99
Fix shape mismatch on tail batch in GRPO training and host CPU OOM
susanbao Jun 30, 2026
9ce291b
Merge pull request #4305 from huytransformer:htn/fix-jax-splash-soft-cap
Google-ML-Automation Jun 30, 2026
7538cd4
Add a new goodput elastic utils function record_slice_state() (#4111)
YixuanWang-99 Jun 30, 2026
7151573
Merge pull request #4252 from AI-Hypercomputer:sanbao/gpt
Google-ML-Automation Jun 30, 2026
aecb57d
Fix HF model dtype fallback in forward_pass_logit_checker
subawocit Jun 30, 2026
36e333c
Fix hlo_diff_test to compile the real NNX path
ecnal-cienet Jun 30, 2026
f6d318a
Refactor DeepSeek MoE/Engram scanned decoder tests to use 3 layers
Shuwen-Fang Jul 1, 2026
d30c749
Merge pull request #4308 from AI-Hypercomputer:fix/hlo-diff-nnx-refer…
Google-ML-Automation Jul 1, 2026
f93d241
feat(gemma3): add Gemma-3 LoRA end-to-end (E2E) post-training and ser…
RexBearIU Jun 4, 2026
985e866
feat(lora): save/restore LoRA config in checkpoint metadata
RexBearIU Jun 25, 2026
3f26d1f
Double-buffer inner scans during gradient accumulation
abhinavgoel95 Jul 1, 2026
a877e45
Merge pull request #4312 from AI-Hypercomputer:fix_engram_test
Google-ML-Automation Jul 1, 2026
af46e4a
Add TPU7x specific CI test workflows
darisoy Jun 26, 2026
1a2a266
Add missing dependencies for google-jetstream to fix pip check
Shuwen-Fang Jul 1, 2026
54e8915
Merge pull request #4317 from AI-Hypercomputer:fix_pip_check_dependen…
Google-ML-Automation Jul 1, 2026
2dbfb58
update
hengtaoguo Jul 1, 2026
c91ca12
Merge pull request #4310 from AI-Hypercomputer:fix-logit-checker-dtype
Google-ML-Automation Jul 1, 2026
0da53c3
Fix emergency NNX checkpoint restore
SujeethJinesh Jul 1, 2026
a9df444
Use synthetic data for scripts under src/maxtext/configs/tpu
aireenmei Jul 1, 2026
1300488
Merge pull request #4320 from AI-Hypercomputer:hengtaoguo-nnx-fix
Google-ML-Automation Jul 1, 2026
ec8b0e0
Merge pull request #4269 from AI-Hypercomputer:jackyf/lora-ckpt-metadata
Google-ML-Automation Jul 1, 2026
ecf666f
Merge pull request #4322 from AI-Hypercomputer:sujinesh/fix-emergency…
Google-ML-Automation Jul 2, 2026
1cf2be5
Avoid checkpoint work on skipped steps
SujeethJinesh Jul 1, 2026
8acd22b
Move data_processing_test to cpu
aireenmei Jul 2, 2026
659513d
Remove stale Tunix degenerate group masking config
AntonyMei Jul 2, 2026
b4e0472
Fix load-balanced TPU Splash masks
huytransformer Jun 29, 2026
f67a8a3
Merge pull request #4316 from abhinavgoel95:double-buffer-inner-scan
Google-ML-Automation Jul 2, 2026
6057403
refactor(lora): support JAX/NNX model wrappers directly in restore_lo…
RexBearIU Jun 4, 2026
08239eb
feat(gemma3_4): add base Gemma3 and Gemma4 models and fix Flax Linen/…
RexBearIU Jul 2, 2026
a679dab
Merge pull request #4067 from AI-Hypercomputer:jackyf/lora-nnx-restor…
Google-ML-Automation Jul 2, 2026
7014e2b
Merge pull request #4298 from huytransformer:htn/tpu-splash-load-bala…
Google-ML-Automation Jul 2, 2026
06a8efc
fix grain_worker_count max value
aireenmei Jul 2, 2026
4a932fb
Merge pull request #4066 from AI-Hypercomputer:jackyf/gemma3_4-base-d…
Google-ML-Automation Jul 2, 2026
f407634
feat(scan_layers): verify scan_layers compatibility from checkpoint m…
RexBearIU Jun 30, 2026
c3d164f
Merge pull request #4068 from AI-Hypercomputer:jackyf/gemma3-lora-e2e…
Google-ML-Automation Jul 2, 2026
f59d857
Merge pull request #4294 from AI-Hypercomputer:darisoy-tpu7x-ci-workf…
Google-ML-Automation Jul 2, 2026
fcb7ebe
Merge pull request #4304 from AI-Hypercomputer:jackyf/proactive-scan-…
Google-ML-Automation Jul 2, 2026
f5f3af7
feat(scan_layers): verify scan_layers compatibility from checkpoint m…
RexBearIU Jun 30, 2026
71b8779
fix(ci): Execute newly added or modified scheduled_only tests in pre-…
mesakhcienet Jul 2, 2026
fd0df72
Merge pull request #4340 from AI-Hypercomputer:jackyf/cleanup-scan-la…
Google-ML-Automation Jul 3, 2026
fa2f825
fix(inference): resolve configuration conflict in vllm_decode
chiajunglien Jul 3, 2026
3b292d3
Merge pull request #4339 from CIeNET-International:fix/scheduled-test…
Google-ML-Automation Jul 6, 2026
5a372d8
Merge pull request #4349 from CIeNET-International:emma/fix_vllm_deco…
Google-ML-Automation Jul 6, 2026
f2c6658
Add video-scaling function for SFT padding
hengtaoguo Jul 5, 2026
4d9b450
Add myself to more files in codeowners
aireenmei Jul 6, 2026
08b54e8
Upgrade JAX to 0.10.2 for pre-training
SurbhiJainUSC Jul 6, 2026
980af47
Merge pull request #4149 from AI-Hypercomputer:pr/reward-functions-knobs
Google-ML-Automation Jul 6, 2026
3f198a9
Merge pull request #4335 from AI-Hypercomputer:aireen/row_sharding_fix
Google-ML-Automation Jul 6, 2026
577b84a
Merge pull request #4353 from AI-Hypercomputer:hengtaoguo-sft-video
Google-ML-Automation Jul 6, 2026
30b0cd1
Merge pull request #4365 from AI-Hypercomputer:pre_0.10.2
Google-ML-Automation Jul 6, 2026
e80fe75
Merge pull request #4366 from AI-Hypercomputer:aireen/code_owners
Google-ML-Automation Jul 6, 2026
cdebf0f
Merge pull request #4333 from AI-Hypercomputer:aireen/grain_test_cpu
Google-ML-Automation Jul 6, 2026
faaa424
Fully remove tp_transpose (tensor transpose parallelism) from MaxText.
Shuwen-Fang Jul 6, 2026
b9aee47
Merge pull request #4367 from Shuwen-Fang:deprecate_tp_transpose
Google-ML-Automation Jul 7, 2026
bc9d5aa
feat(scan_layers): dynamically set scan_layers from checkpoint metadata
RexBearIU Jul 3, 2026
393dee4
Integrating TE Collective GEMM
dinodeep Jun 30, 2026
79fa53b
No public description
Google-ML-Automation Jul 7, 2026
eab9d7e
Merge pull request #4307 from dinodeep:dinodeep/2026-06-15/collective…
Google-ML-Automation Jul 7, 2026
3178ed4
e2e tests and fixes for qwen3-30b
YixuanWang-99 Jul 7, 2026
6a5ecc4
Merge pull request #4334 from AI-Hypercomputer:fix-tunix-pr-1637-dege…
Google-ML-Automation Jul 7, 2026
90b0395
Support load-balanced CP chunk masks
huytransformer Jul 3, 2026
422ed52
Use active elastic devices for Pathways MTC init
SujeethJinesh Jul 3, 2026
7aac059
ci: add ci fail-fast implementation plan
mesakhcienet Jul 7, 2026
b149d60
Merge pull request #4344 from AI-Hypercomputer:jackyf/dynamic-scan-la…
Google-ML-Automation Jul 8, 2026
28e9cf7
Fix: Gemma4 checkpoint conversion failure when enable_nnx=True
chiajunglien Jul 8, 2026
3dc1efe
Merge pull request #4377 from AI-Hypercomputer:ci/fail-fast-orchestra…
Google-ML-Automation Jul 8, 2026
989abc6
Merge pull request #4364 from huytransformer:htn/load-balanced-cp-chu…
Google-ML-Automation Jul 8, 2026
833d4f5
Fix XLA SPMD partitioning hang for kvcache_test.py on 8-device runner…
darisoy Jul 6, 2026
ebd4a78
Merge pull request #4378 from CIeNET-International:emma/fix-gemma4-cp…
Google-ML-Automation Jul 8, 2026
e643f5b
e2e tests and fixes for qwen3-30b (#4185)
YixuanWang-99 Jul 8, 2026
43a0b12
Merge pull request #4368 from AI-Hypercomputer:darisoy-fix-kvcache-tpu7x
Google-ML-Automation Jul 8, 2026
6e9c2be
Enabled layers test against torch for CI only
hengtaoguo Jul 7, 2026
7c6386a
Merge pull request #4371 from AI-Hypercomputer:hengtaoguo-test
Google-ML-Automation Jul 8, 2026
a8f40eb
Enable MoE ragged sort tests on TPU7X (remove skip_on_tpu7x)
darisoy Jul 8, 2026
e9e0cd2
Merge pull request #4185 from AI-Hypercomputer:yixuann-dev-qwen330
Google-ML-Automation Jul 8, 2026
909fd01
Merge pull request #4329 from AI-Hypercomputer:aireen/tpu_script_syn
Google-ML-Automation Jul 8, 2026
0cec2ab
Merge pull request #4350 from AI-Hypercomputer:sujinesh/pathways-mtc-…
Google-ML-Automation Jul 8, 2026
4145a59
Automated Code Change
h-joo Jul 8, 2026
7957526
Merge pull request #4326 from AI-Hypercomputer:sujinesh/avoid-skipped…
Google-ML-Automation Jul 8, 2026
e3144b3
Automated Code Change
h-joo Jul 9, 2026
85ae4ec
Fix pylint pre-commit hook scanning entire repo on PRs
Shuwen-Fang Jul 9, 2026
9e4465c
Merge pull request #4391 from AI-Hypercomputer:darisoy-enable-moe-tpu7x
Google-ML-Automation Jul 9, 2026
131fbf5
Merge pull request #4396 from AI-Hypercomputer:fix_pylint_pre_commit
Google-ML-Automation Jul 9, 2026
21f76b3
Return was_restored flag from setup_training_state to fix standalone …
xibinliu Jul 8, 2026
ea9a31d
Update tgmm
Shuwen-Fang Jun 22, 2026
2ee9fe1
Merge pull request #4227 from AI-Hypercomputer:tgmm_ps
Google-ML-Automation Jul 9, 2026
d2eaacf
Add Qwen3-Omni layers test to CI
hengtaoguo Jul 9, 2026
c6128dd
Fix NNX checkpoint unrolling axis out of bounds error
hsuan-lun-chiang Jul 8, 2026
052fda6
Split TPU/GPU nightly builds and run E2E/CI tests in parallel
RexBearIU Jul 9, 2026
d93a4c4
Merge pull request #4394 from AI-Hypercomputer:xibin/standalone_ckpt
Google-ML-Automation Jul 9, 2026
409f43b
Merge pull request #4095 from AI-Hypercomputer:chris/dev/vanilla-dilo…
Google-ML-Automation Jul 9, 2026
b053cb9
fix(nnx): filter transient runtime variables during checkpoint restor…
xibinliu Jul 9, 2026
8a41c4d
Merge pull request #4402 from AI-Hypercomputer:hengtaoguo-test
Google-ML-Automation Jul 9, 2026
d81f8fa
add Qwen3 VL tests, update logit checker, and golden logit generator
subawocit Jul 1, 2026
682d884
Merge pull request #4369 from AI-Hypercomputer:fix/nnx-unroll-scan-axis
Google-ML-Automation Jul 10, 2026
96a71e7
Merge pull request #4401 from AI-Hypercomputer:jackyf/ci-test-parallel
Google-ML-Automation Jul 10, 2026
9885671
Merge pull request #4330 from AI-Hypercomputer:update-logit-checker
Google-ML-Automation Jul 10, 2026
7d8d169
Merge pull request #4411 from AI-Hypercomputer:xibin/decode_tests
Google-ML-Automation Jul 10, 2026
c67a6c3
Add htn to maxtext OWNERS
htn-a11y Jul 11, 2026
eff35d3
Fix Data Loss issue.
abhinavclemson Jul 11, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
* @abhinavclemson @gobbleturk @khatwanimohit @bvandermoon @vipannalla @RissyRan @richjames0 @gagika @shralex @SurbhiJainUSC @hengtaoguo @A9isha @aireenmei @NuojCheng @jiangjy1982 @suexu1025 @NicoGrande @jesselu-google @dipannita08 @igorts-git @darisoy @xibinliu
* @abhinavclemson @gobbleturk @khatwanimohit @bvandermoon @vipannalla @RissyRan @richjames0 @gagika @shralex @SurbhiJainUSC @hengtaoguo @A9isha @aireenmei @NuojCheng @jiangjy1982 @suexu1025 @NicoGrande @jesselu-google @dipannita08 @igorts-git @darisoy @xibinliu @huytransformer

# Model bring-up
src/maxtext/assets @parambole @shuningjin @RissyRan @suexu1025 @jiangjy1982 @gobbleturk @bvandermoon @gagika @shralex @richjames0 @NicoGrande
src/maxtext/configs/models @parambole @shuningjin @RissyRan @suexu1025 @jiangjy1982 @gobbleturk @bvandermoon @gagika @shralex @richjames0 @NicoGrande @jesselu-google @NuojCheng
src/maxtext/checkpoint_conversion @parambole @shuningjin @RissyRan @suexu1025 @jiangjy1982 @gobbleturk @bvandermoon @hengtaoguo @gagika @shralex @richjames0 @NicoGrande
src/maxtext/layers @parambole @shuningjin @RissyRan @suexu1025 @jiangjy1982 @gobbleturk @bvandermoon @gagika @shralex @richjames0 @NicoGrande @jesselu-google @NuojCheng @xibinliu
src/maxtext/models @parambole @shuningjin @RissyRan @suexu1025 @jiangjy1982 @gobbleturk @bvandermoon @gagika @shralex @richjames0 @NicoGrande @jesselu-google @NuojCheng @xibinliu
src/maxtext/assets @parambole @shuningjin @RissyRan @suexu1025 @jiangjy1982 @gobbleturk @bvandermoon @gagika @shralex @richjames0 @NicoGrande @aireenmei
src/maxtext/configs/models @parambole @shuningjin @RissyRan @suexu1025 @jiangjy1982 @gobbleturk @bvandermoon @gagika @shralex @richjames0 @NicoGrande @jesselu-google @NuojCheng @aireenmei
src/maxtext/checkpoint_conversion @parambole @shuningjin @RissyRan @suexu1025 @jiangjy1982 @gobbleturk @bvandermoon @hengtaoguo @gagika @shralex @richjames0 @NicoGrande @aireenmei
src/maxtext/layers @parambole @shuningjin @RissyRan @suexu1025 @jiangjy1982 @gobbleturk @bvandermoon @gagika @shralex @richjames0 @NicoGrande @jesselu-google @NuojCheng @xibinliu @huytransformer @aireenmei
src/maxtext/models @parambole @shuningjin @RissyRan @suexu1025 @jiangjy1982 @gobbleturk @bvandermoon @gagika @shralex @richjames0 @NicoGrande @jesselu-google @NuojCheng @xibinliu @huytransformer @aireenmei

# Features
src/maxtext/experimental/rl @A9isha @khatwanimohit @xuefgu @gagika @richjames0 @shralex @NicoGrande @darisoy
Expand All @@ -29,10 +29,10 @@ src/maxtext/inference @vipannalla @mitalisi @gpolovets1 @mailvijayasingh @jrplat
src/dependencies/ @bvandermoon @SurbhiJainUSC @parambole @richjames0 @shralex @darisoy

# Docs
docs/ @jacoguzo @bvandermoon @SurbhiJainUSC @richjames0 @shralex @gobbleturk @RissyRan @gagika @A9isha @jiangjy1982 @vipannalla @darisoy
docs/ @jacoguzo @bvandermoon @SurbhiJainUSC @richjames0 @shralex @gobbleturk @RissyRan @gagika @A9isha @jiangjy1982 @vipannalla @darisoy @aireenmei

# Workflow files
.github/workflows/ @gobbleturk @khatwanimohit @shralex @parambole @bvandermoon @richjames0 @darisoy @xibinliu
.github/workflows/ @gobbleturk @khatwanimohit @shralex @parambole @bvandermoon @richjames0 @darisoy @xibinliu @huytransformer

# Benchmarking/Recipes
benchmarks/ @SujeethJinesh @bvandermoon @richjames0 @shralex @vipannalla @mitalisi @RissyRan @shauryagup @NuojCheng @gobbleturk @khatwanimohit @Obliviour @notabee @suexu1025 @darisoy
benchmarks/ @SujeethJinesh @bvandermoon @richjames0 @shralex @vipannalla @mitalisi @RissyRan @shauryagup @NuojCheng @gobbleturk @khatwanimohit @Obliviour @notabee @suexu1025 @darisoy @aireenmei
6 changes: 5 additions & 1 deletion .github/workflows/build_and_push_docker_image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ on:
required: false
type: boolean
default: false
run_tests:
required: false
type: boolean
default: true
outputs:
build_result:
description: 'The result of build_and_push job.'
Expand Down Expand Up @@ -184,7 +188,7 @@ jobs:
run_ci_tests:
name: Run Unit and Integration Tests
needs: [pre_build_check, build_and_push]
if: needs.pre_build_check.outputs.should_run == 'true' && inputs.include_test_assets == true
if: needs.pre_build_check.outputs.should_run == 'true' && inputs.include_test_assets == true && inputs.run_tests == true
uses: ./.github/workflows/run_ci_tests.yml
with:
image_name: ${{ inputs.image_name }}
Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/check_docs_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,11 @@
name: Check the Documentation Build

on:
pull_request:
types: [opened, synchronize]
workflow_call:
inputs:
maxtext_sha:
required: true
description: 'The specific MaxText commit SHA.'
required: false
type: string
workflow_dispatch:

Expand All @@ -38,7 +37,7 @@ jobs:
with:
persist-credentials: false
fetch-depth: 0
ref: ${{ inputs.maxtext_sha }}
ref: ${{ inputs.maxtext_sha || github.sha }}

- name: Check if only documentation changed
id: check
Expand Down
122 changes: 81 additions & 41 deletions .github/workflows/ci_pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -126,12 +126,23 @@ jobs:
echo "run_notebooks=false" >> $GITHUB_OUTPUT
fi

code_quality_check:
uses: ./.github/workflows/code_quality.yml
with:
maxtext_sha: ${{ inputs.maxtext_sha || github.sha }}

docs_build_check:
uses: ./.github/workflows/check_docs_build.yml
with:
maxtext_sha: ${{ inputs.maxtext_sha || github.sha }}

build_and_upload_maxtext_package:
needs: analyze_code_changes
# Run if either tests or notebooks need to run
needs: [analyze_code_changes, code_quality_check, docs_build_check]
# Run if either tests or notebooks need to run; on PRs, gate on code quality + docs passing
if: |
needs.analyze_code_changes.outputs.run_tests == 'true' ||
needs.analyze_code_changes.outputs.run_notebooks == 'true'
always() &&
(needs.analyze_code_changes.outputs.run_tests == 'true' || needs.analyze_code_changes.outputs.run_notebooks == 'true') &&
(github.event_name != 'pull_request' || (needs.code_quality_check.result == 'success' && needs.docs_build_check.result == 'success'))
uses: ./.github/workflows/build_package.yml
with:
device_type: tpu
Expand All @@ -154,15 +165,60 @@ jobs:
secrets:
HF_TOKEN: ${{ secrets.HF_TOKEN }}

gate_test_run:
name: Gate and Formalize Parameters
needs: [analyze_code_changes, build_and_upload_maxtext_package]
if: |
always() &&
needs.analyze_code_changes.outputs.run_tests == 'true' &&
needs.build_and_upload_maxtext_package.result == 'success'
runs-on: ubuntu-latest
outputs:
total_workers: ${{ steps.set-params.outputs.total_workers }}
worker_groups: ${{ steps.set-params.outputs.worker_groups }}
steps:
- id: set-params
name: Formalize Test Suite Parameters
run: |
TPU_UNIT_TOTAL_WORKERS=2
TPU_UNIT_WORKER_GROUPS='[1, 2]'
echo "total_workers=${TPU_UNIT_TOTAL_WORKERS}" >> "$GITHUB_OUTPUT"
echo "worker_groups=${TPU_UNIT_WORKER_GROUPS}" >> "$GITHUB_OUTPUT"

tpu-tests:
name: ${{ matrix.flavor || 'TPU' }} tests
needs: [build_and_upload_maxtext_package, gate_test_run]
uses: ./.github/workflows/run_tests_coordinator.yml
strategy:
fail-fast: false
matrix:
flavor: [tpu-unit, tpu-integration, tpu-post-training-unit]
with:
flavor: ${{ matrix.flavor }}
base_image: maxtext-unit-test-tpu:py312
is_scheduled_run: ${{ github.event_name == 'schedule' }}
maxtext_sha: ${{ needs.build_and_upload_maxtext_package.outputs.maxtext_sha }}

maxtext_cpu_torch_reference_tests:
name: cpu-torch-reference tests
needs: [build_and_upload_maxtext_package]
if: needs.analyze_code_changes.outputs.run_tests == 'true'
uses: ./.github/workflows/run_tests_coordinator.yml
with:
flavor: cpu-torch-reference
base_image: maxtext-unit-test-tpu:py312
is_scheduled_run: ${{ github.event_name == 'schedule' }}
maxtext_sha: ${{ needs.build_and_upload_maxtext_package.outputs.maxtext_sha }}

tpu7x-tests:
name: TPU7X tests
needs: [build_and_upload_maxtext_package, gate_test_run]
if: github.ref == 'refs/heads/main' && (github.event_name == 'schedule' || github.event_name == 'workflow_dispatch')
uses: ./.github/workflows/run_tests_coordinator.yml
strategy:
fail-fast: false
matrix:
flavor: [tpu-unit, tpu-integration, tpu-post-training-unit]
flavor: [tpu7x-unit, tpu7x-integration, tpu7x-post-training-unit]
with:
flavor: ${{ matrix.flavor }}
base_image: maxtext-unit-test-tpu:py312
Expand All @@ -171,8 +227,7 @@ jobs:

gpu-tests:
name: ${{ matrix.flavor || 'GPU' }} tests
needs: [build_and_upload_maxtext_package]
if: needs.analyze_code_changes.outputs.run_tests == 'true'
needs: [build_and_upload_maxtext_package, gate_test_run]
strategy:
fail-fast: false
matrix:
Expand All @@ -186,8 +241,7 @@ jobs:

cpu-tests:
name: ${{ matrix.flavor || 'CPU' }} tests
needs: [build_and_upload_maxtext_package]
if: needs.analyze_code_changes.outputs.run_tests == 'true'
needs: [build_and_upload_maxtext_package, gate_test_run]
uses: ./.github/workflows/run_tests_coordinator.yml
strategy:
fail-fast: false
Expand All @@ -199,31 +253,13 @@ jobs:
is_scheduled_run: ${{ github.event_name == 'schedule' }}
maxtext_sha: ${{ needs.build_and_upload_maxtext_package.outputs.maxtext_sha }}

setup-pathways-parameters:
name: Setup Pathways Parameters
runs-on: ubuntu-latest
outputs:
total_workers: ${{ steps.set-params.outputs.total_workers }}
worker_groups: ${{ steps.set-params.outputs.worker_groups }}
steps:
- id: set-params
name: Set Pathways Worker Parameters
run: |
# TPU worker constants
TPU_UNIT_TOTAL_WORKERS=2
TPU_UNIT_WORKER_GROUPS='[1, 2]'

echo "total_workers=${TPU_UNIT_TOTAL_WORKERS}" >> "$GITHUB_OUTPUT"
echo "worker_groups=${TPU_UNIT_WORKER_GROUPS}" >> "$GITHUB_OUTPUT"

maxtext_tpu_pathways_unit_tests:
needs: [build_and_upload_maxtext_package, setup-pathways-parameters]
if: needs.analyze_code_changes.outputs.run_tests == 'true'
needs: [build_and_upload_maxtext_package, gate_test_run]
uses: ./.github/workflows/run_pathways_tests.yml
strategy:
fail-fast: false
matrix:
group: ${{ fromJSON(needs.setup-pathways-parameters.outputs.worker_groups) }}
group: ${{ fromJSON(needs.gate_test_run.outputs.worker_groups || '[1, 2]') }}
with:
device_type: tpu
device_name: v6e-4
Expand All @@ -236,11 +272,11 @@ jobs:
container_resource_option: "--privileged"
is_scheduled_run: ${{ github.event_name == 'schedule' }}
maxtext_sha: ${{ needs.build_and_upload_maxtext_package.outputs.maxtext_sha }}
total_workers: ${{ needs.setup-pathways-parameters.outputs.total_workers }}
total_workers: ${{ needs.gate_test_run.outputs.total_workers || '2' }}
worker_group: ${{ matrix.group }}

maxtext_tpu_pathways_integration_tests:
needs: build_and_upload_maxtext_package
needs: [build_and_upload_maxtext_package, gate_test_run]
uses: ./.github/workflows/run_pathways_tests.yml
strategy:
fail-fast: false
Expand All @@ -259,20 +295,20 @@ jobs:

all_tests_passed:
name: All Required Tests Passed
needs: [tpu-tests, gpu-tests, cpu-tests, maxtext_tpu_pathways_unit_tests, maxtext_tpu_pathways_integration_tests]
needs: [build_and_upload_maxtext_package, gate_test_run, tpu-tests, tpu7x-tests, gpu-tests, cpu-tests, maxtext_cpu_torch_reference_tests, maxtext_tpu_pathways_unit_tests, maxtext_tpu_pathways_integration_tests, code_quality_check, docs_build_check]
if: always()
runs-on: ubuntu-latest
steps:
- name: Check test results
run: |
if [ "${NEEDS_ANALYZE_CHANGES_OUTPUTS_RUN_TESTS}" == "false" ]; then
echo "Tests were skipped"
exit 0
fi

# Otherwise, check that build and all tests passed or were skipped
# Check that build and all tests passed or were skipped
echo "Build result: ${NEEDS_BUILD_AND_UPLOAD_MAXTEXT_PACKAGE_RESULT}"
echo "Code Quality result: ${NEEDS_CODE_QUALITY_CHECK_RESULT}"
echo "Docs Build result: ${NEEDS_DOCS_BUILD_CHECK_RESULT}"
echo "Gate result: ${NEEDS_GATE_TEST_RUN_RESULT}"
echo "TPU Tests (Matrix) result: ${NEEDS_TPU_TESTS_RESULT}"
echo "TPU7X Tests (Matrix) result: ${NEEDS_TPU7X_TESTS_RESULT}"
echo "CPU torch reference tests result: ${NEEDS_MAXTEXT_CPU_TORCH_REFERENCE_TESTS_RESULT}"
echo "GPU Tests (Matrix) result: ${NEEDS_GPU_TESTS_RESULT}"
echo "CPU Tests (Matrix) result: ${NEEDS_CPU_TESTS_RESULT}"
echo "Pathways Unit result: ${NEEDS_MAXTEXT_TPU_PATHWAYS_UNIT_TESTS_RESULT}"
Expand All @@ -286,10 +322,14 @@ jobs:

echo "All required tests passed successfully"
env:
NEEDS_ANALYZE_CODE_CHANGES_OUTPUTS_RUN_TESTS: ${{ needs.analyze_code_changes.outputs.run_tests }}
NEEDS_BUILD_AND_UPLOAD_MAXTEXT_PACKAGE_RESULT: ${{ needs.build_and_upload_maxtext_package.result }}
NEEDS_CODE_QUALITY_CHECK_RESULT: ${{ needs.code_quality_check.result }}
NEEDS_DOCS_BUILD_CHECK_RESULT: ${{ needs.docs_build_check.result }}
NEEDS_GATE_TEST_RUN_RESULT: ${{ needs.gate_test_run.result }}
NEEDS_CPU_TESTS_RESULT: ${{ needs.cpu-tests.result }}
NEEDS_TPU_TESTS_RESULT: ${{ needs.tpu-tests.result }}
NEEDS_TPU7X_TESTS_RESULT: ${{ needs.tpu7x-tests.result }}
NEEDS_MAXTEXT_CPU_TORCH_REFERENCE_TESTS_RESULT: ${{ needs.maxtext_cpu_torch_reference_tests.result }}
NEEDS_GPU_TESTS_RESULT: ${{ needs.gpu-tests.result }}
NEEDS_MAXTEXT_TPU_PATHWAYS_UNIT_TESTS_RESULT: ${{ needs.maxtext_tpu_pathways_unit_tests.result }}
NEEDS_MAXTEXT_TPU_PATHWAYS_INTEGRATION_TESTS_RESULT: ${{ needs.maxtext_tpu_pathways_integration_tests.result }}
Expand Down Expand Up @@ -325,7 +365,7 @@ jobs:

notify_failure:
name: Notify failed build # creates an issue or modifies last open existing issue for failed build
needs: [tpu-tests, gpu-tests, cpu-tests, maxtext_jupyter_notebooks, maxtext_tpu_pathways_unit_tests, maxtext_tpu_pathways_integration_tests]
needs: [gate_test_run, tpu-tests, tpu7x-tests, gpu-tests, cpu-tests, maxtext_jupyter_notebooks, maxtext_cpu_torch_reference_tests, maxtext_tpu_pathways_unit_tests, maxtext_tpu_pathways_integration_tests, code_quality_check, docs_build_check]
if: ${{ always() }}
runs-on: ubuntu-latest
permissions:
Expand All @@ -339,7 +379,7 @@ jobs:

investigate_failure:
name: Investigate failed build # investigates failure of scheduled run and comments on tracking issue
needs: [tpu-tests, gpu-tests, cpu-tests, maxtext_jupyter_notebooks, maxtext_tpu_pathways_unit_tests, maxtext_tpu_pathways_integration_tests, notify_failure]
needs: [gate_test_run, tpu-tests, tpu7x-tests, gpu-tests, cpu-tests, maxtext_jupyter_notebooks, maxtext_cpu_torch_reference_tests, maxtext_tpu_pathways_unit_tests, maxtext_tpu_pathways_integration_tests, code_quality_check, docs_build_check, notify_failure]
if: ${{ always() && contains(needs.*.result, 'failure') && github.event_name == 'schedule' }}
uses: ./.github/workflows/gemini_investigate.yml
permissions:
Expand Down
31 changes: 17 additions & 14 deletions .github/workflows/code_quality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,24 +17,22 @@
name: Code Quality

on:
pull_request:

concurrency:
# Dedup pull requests (canceling previous runs of the same workflow for same PR), and scheduled runs but nothing else
group: >
${{
github.event_name == 'pull_request' && format('{0}-pr-{1}', github.workflow, github.event.pull_request.number) ||
github.event_name == 'schedule' && format('{0}-schedule', github.workflow) ||
github.run_id
}}
cancel-in-progress: true
workflow_call:
inputs:
maxtext_sha:
description: 'The specific MaxText commit SHA.'
required: false
type: string

jobs:
qa:
name: "Static code-quality checkers"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
with:
fetch-depth: 0
ref: ${{ inputs.maxtext_sha || github.sha }}

- name: Install uv and set the Python version
uses: astral-sh/setup-uv@v7
Expand All @@ -56,7 +54,12 @@ jobs:

- name: Run pre-commit checks on just the files that have changed
run: |
git fetch origin "$GITHUB_BASE_REF":"$GITHUB_BASE_REF"
git branch "$GITHUB_HEAD_REF"
. "$GITHUB_WORKSPACE"/venv/bin/activate
pre-commit run --from-ref "$GITHUB_BASE_REF" --to-ref "$GITHUB_HEAD_REF" --show-diff-on-failure
if [ "${{ github.event_name }}" == "pull_request" ]; then
git fetch origin "$GITHUB_BASE_REF":"$GITHUB_BASE_REF"
git branch "$GITHUB_HEAD_REF"
pre-commit run --from-ref "$GITHUB_BASE_REF" --to-ref "$GITHUB_HEAD_REF" --show-diff-on-failure
else
echo "Not a pull request event (${{ github.event_name }}), checking all files."
pre-commit run --all-files --show-diff-on-failure
fi
Loading