Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 2 additions & 2 deletions .github/workflows/build_and_test_maxtext.yml
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ jobs:
needs: analyze_code_changes
# Run if either tests or notebooks need to run
if: |
needs.analyze_code_changes.outputs.run_tests == 'true' ||
needs.analyze_code_changes.outputs.run_tests == 'true' ||
needs.analyze_code_changes.outputs.run_notebooks == 'true'
uses: ./.github/workflows/build_package.yml
with:
Expand Down Expand Up @@ -318,4 +318,4 @@ jobs:
actions: 'read'
with:
failed_run_id: '${{ github.run_id }}'
secrets: inherit
secrets: inherit
4 changes: 2 additions & 2 deletions .github/workflows/gemini-dispatch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ defaults:
jobs:
debugger:
# Debug mode: with a repository variable called DEBUG to true
if: |-
if: |-
${{ fromJSON(vars.DEBUG || vars.ACTIONS_STEP_DEBUG || false) }}
runs-on: 'ubuntu-latest'
permissions:
Expand All @@ -39,7 +39,7 @@ jobs:
DEBUG_event__pull_request__author_association: '${{ github.event.pull_request.author_association }}'
DEBUG_event__review__author_association: '${{ github.event.review.author_association }}'
DEBUG_event: '${{ toJSON(github.event) }}'
run: |-
run: |-
env | grep '^DEBUG_'
dispatch:
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/gemini-investigate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
PR_NUMBER: ${{ github.event.workflow_run.pull_requests[0].number || github.event.pull_request.number || github.event.issue.number }}
run: |
mkdir -p .gemini

# Determine target run ID
if [ -z "$RUN_ID" ]; then
# If SHA/BRANCH are missing (e.g. on issue_comment event), fetch them from PR
Expand All @@ -45,22 +45,22 @@ jobs:
SHA=$(gh pr view "$PR_NUMBER" --repo "$REPO" --json headRefOid --jq '.headRefOid' 2>/dev/null || true)
BRANCH=$(gh pr view "$PR_NUMBER" --repo "$REPO" --json headRefName --jq '.headRefName' 2>/dev/null || true)
fi

# Fallback to finding the latest failed run for this PR's specific commit
if [ -n "$SHA" ]; then
echo "Searching for failed runs for commit: $SHA"
RUN_ID=$(gh run list --workflow "MaxText Package Tests" --status failure --commit "$SHA" --limit 1 --json databaseId --jq '.[0].databaseId' --repo "$REPO")
fi

# Fallback to branch if commit-specific run wasn't found
if [ -z "$RUN_ID" ] && [ -n "$BRANCH" ]; then
echo "Searching for failed runs on branch: $BRANCH"
RUN_ID=$(gh run list --workflow "MaxText Package Tests" --status failure --branch "$BRANCH" --limit 1 --json databaseId --jq '.[0].databaseId' --repo "$REPO")
fi
fi

echo "Gathering logs for failed run: $RUN_ID"

if [ -n "$RUN_ID" ]; then
# Retrieve only the failing lines/jobs to avoid token limit overhead
gh run view "$RUN_ID" --log-failed --repo "$REPO" > .gemini/failed_logs.txt || true
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/gemini-invoke.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
permission-pull-requests: 'write'

- name: 'Run Gemini CLI'
# Trigger Gemini with context
# Trigger Gemini with context
id: 'run_gemini'
uses: 'google-github-actions/run-gemini-cli@main'
env:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/gemini-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ jobs:
ADDITIONAL_CONTEXT: '${{ inputs.additional_context }}'

- name: 'Run Gemini pull request review'
# reviews code with detailed set of instructions for the Gemini
# reviews code with detailed set of instructions for the Gemini
uses: 'google-github-actions/run-gemini-cli@v0'
id: 'gemini_pr_review'
env:
Expand All @@ -71,7 +71,7 @@ jobs:
PULL_REQUEST_NUMBER: '${{ github.event.pull_request.number || github.event.issue.number }}'
REPOSITORY: '${{ github.repository }}'
ADDITIONAL_CONTEXT: '${{ inputs.additional_context }}'
with:
with:
gcp_location: '${{ vars.GOOGLE_CLOUD_LOCATION }}'
gcp_project_id: '${{ vars.GOOGLE_CLOUD_PROJECT }}'
gcp_service_account: '${{ vars.SERVICE_ACCOUNT_EMAIL }}'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pypi_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
needs: [release_approval]
uses: ./.github/workflows/build_and_test_maxtext.yml
secrets: inherit

publish_maxtext_package_to_pypi:
name: Publish MaxText package to PyPI
needs: [build_and_test_maxtext_package]
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/run_jupyter_notebooks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,15 +73,15 @@ jobs:
# 2. Install MaxText package and all the post training dependencies
uv pip install ${maxtext_wheel}[tpu-post-train] --resolution=lowest
install_tpu_post_train_extra_deps

python3 -m pip freeze
- name: Run Post-Training Notebooks
shell: bash
env:
HF_TOKEN: ${{ secrets.HF_TOKEN }}
MAXTEXT_INSTALLED: ${{ inputs.maxtext_installed }}
# TODO: Fix evaluation in sft_qwen3_demo.ipynb and remove this env variable
RUN_EVALUATION: "False"
RUN_EVALUATION: "false"
run: |
if [ "${MAXTEXT_INSTALLED}" == "true" ]; then
# Move to the directory where code is baked into the image. See the Dockerfile.
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/run_tests_against_package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,9 @@ jobs:
TF_FORCE_GPU_ALLOW_GROWTH: ${{ inputs.tf_force_gpu_allow_growth }}
TPU_SKIP_MDS_QUERY: ${{ inputs.device_type == 'cpu' && '1' || '' }}
MAXTEXT_PACKAGE_EXTRA: >-
${{
!contains(inputs.pytest_marker, 'not post_training') && 'tpu-post-train'
|| (inputs.device_type == 'cpu' && 'tpu' || inputs.device_type)
${{
!contains(inputs.pytest_marker, 'not post_training') && 'tpu-post-train'
|| (inputs.device_type == 'cpu' && 'tpu' || inputs.device_type)
}}
ALLOW_MULTIPLE_LIBTPU_LOAD: ${{ inputs.device_type == 'cpu' && 'true' || '' }} # bypass /tmp/libtpu_lockfile check for cpu tests, which don't actually use accelerators (to allow concurrency)
options: ${{ inputs.container_resource_option }}
Expand Down Expand Up @@ -171,7 +171,7 @@ jobs:
else
SPLIT_ARGS=""
fi

# Setup substitution: If manually updating HLO, skip tests execution and run only the update script instead!
if [ "${INPUTS_IS_UPDATE_HLO}" == "true" ]; then
python3 tests/utils/update_hlo_references.py
Expand Down
6 changes: 6 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,9 @@ repos:
additional_dependencies: [mdformat-myst, mdformat-ruff]
files: (docs/.)
exclude: docs/guides/checkpointing_solutions.md|docs/guides.md

- repo: https://github.com/adrienverge/yamllint
rev: v1.35.0
hooks:
- id: yamllint
types: [yaml]
8 changes: 8 additions & 0 deletions .yamllint
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
extends: relaxed
rules:
line-length: disable
comments: disable
indentation: disable
commas: disable
colons: disable
empty-lines: disable
Loading
Loading