|
33 | 33 | HF_HUB_ENABLE_HF_TRANSFER: "1" |
34 | 34 |
|
35 | 35 | jobs: |
36 | | - run_prod: |
37 | | - runs-on: [linux-x86-ct5lp-224-8tpu] |
38 | | - environment: testing |
39 | | - container: |
40 | | - image: us-docker.pkg.dev/tpu-prod-env-multipod/jax-stable-stack/candidate/tpu:latest |
41 | | - options: --privileged |
42 | | - env: |
43 | | - CLOUD_TPU_ACCELERATOR: v5e-8 |
44 | | - JAX_PLATFORMS: tpu |
45 | | - steps: |
46 | | - |
47 | | - # Cache Hugging Face hub |
48 | | - - name: Cache HF hub |
49 | | - uses: actions/cache@v4 |
50 | | - with: |
51 | | - path: ~/.cache/huggingface |
52 | | - key: hf-${{ runner.os }}-${{ hashFiles('pyproject.toml', 'requirements*.txt', 'constraints*.txt') }} |
53 | | - restore-keys: | |
54 | | - hf-${{ runner.os }}- |
55 | | -
|
56 | | - - name: Checkout code |
57 | | - uses: actions/checkout@v4 |
58 | | - with: |
59 | | - fetch-depth: 0 |
60 | | - |
61 | | - - name: Install tunix dependencies |
62 | | - run: | |
63 | | - pip install --upgrade pip |
64 | | - pip install -e .[prod] --force-reinstall |
65 | | - pip install pytest pytest-xdist |
66 | | -
|
67 | | - - name: Verify TPU availability |
68 | | - run: | |
69 | | - python -c " |
70 | | - import jax |
71 | | - print(f'JAX version: {jax.__version__}') |
72 | | - print(f'JAX devices: {jax.devices()}') |
73 | | -
|
74 | | - # Check if we have TPU devices specifically |
75 | | - devices = jax.devices() |
76 | | - has_tpu = len(devices) > 0 and all(device.platform == 'tpu' for device in devices) |
77 | | - print(f'TPU available: {has_tpu}') |
78 | | -
|
79 | | - if not has_tpu: |
80 | | - print('ERROR: No TPU devices found! Expected TPU devices but got:', [device.platform for device in devices]) |
81 | | - exit(1) |
82 | | - else: |
83 | | - print(f'SUCCESS: Found {len(devices)} TPU device(s)') |
84 | | - " |
85 | | -
|
86 | | - - name: Run tunix model tests |
87 | | - run: | |
88 | | - python -m pytest tests/models/ -v --tb=short -m "not cpu_only and not gpu_only" |
89 | | -
|
90 | | - - name: Run tunix generation tests (PASSED only) |
91 | | - run: | |
92 | | - # tokenizer_adapter_test requires access to gated repo |
93 | | - # TODO(b/459824938) Add back test_logprobs_extraction_with_missing_token after fixing the issue |
94 | | - python -m pytest tests/generate/ -v --tb=short \ |
95 | | - --ignore=tests/generate/vllm_sampler_test.py \ |
96 | | - --ignore=tests/generate/vllm_driver_test.py \ |
97 | | - --ignore=tests/generate/tokenizer_adapter_test.py \ |
98 | | - --ignore=tests/generate/sglang_jax_sampler_test.py \ |
99 | | - --ignore=tests/generate/utils_test.py |
100 | | -
|
101 | | - python -m pytest tests/generate/utils_test.py -k "not test_logprobs_extraction_with_missing_token" |
102 | | -
|
103 | | - - name: Run tunix SFT tests |
104 | | - run: | |
105 | | - python -m pytest tests/sft/ -v --tb=short |
106 | | -
|
107 | | - - name: Run tunix distillation tests |
108 | | - run: | |
109 | | - python -m pytest tests/distillation/ -v --tb=short |
110 | | -
|
111 | | - - name: Run tunix RL tests |
112 | | - run: | |
113 | | - # RL common tests that passed |
114 | | - # b/448133814: test_grpo_with_lora_model fails |
115 | | - python -m pytest tests/rl/ -v --tb=short -k "not test_grpo_with_lora_model" --ignore=tests/rl/experimental/agentic |
116 | | -
|
117 | | - - name: Run tunix tests not covered by the above categories |
118 | | - run: | |
119 | | - # This category is to catch tests added but not covered by CI yet. Whenever you add new folders under tests/, please add a new category above and skip those tests here. |
120 | | - python -m pytest tests/ -v --tb=short --ignore=tests/perf/ --ignore=tests/model_alignment/ --ignore=tests/models/ --ignore=tests/cli/ --ignore=tests/generate/ --ignore=tests/sft/ --ignore=tests/distillation/ --ignore=tests/rl/ || code=$? |
121 | | - if [ "${code:-0}" = "5" ]; then |
122 | | - echo "No tests collected (expected)." |
123 | | - exit 0 |
124 | | - else |
125 | | - exit "${code:-0}" |
126 | | - fi |
| 36 | + # run_prod: |
| 37 | + # runs-on: [linux-x86-ct5lp-224-8tpu] |
| 38 | + # environment: testing |
| 39 | + # container: |
| 40 | + # image: us-docker.pkg.dev/tpu-prod-env-multipod/jax-stable-stack/candidate/tpu:latest |
| 41 | + # options: --privileged |
| 42 | + # env: |
| 43 | + # CLOUD_TPU_ACCELERATOR: v5e-8 |
| 44 | + # JAX_PLATFORMS: tpu |
| 45 | + # steps: |
| 46 | + |
| 47 | + # # Cache Hugging Face hub |
| 48 | + # - name: Cache HF hub |
| 49 | + # uses: actions/cache@v4 |
| 50 | + # with: |
| 51 | + # path: ~/.cache/huggingface |
| 52 | + # key: hf-${{ runner.os }}-${{ hashFiles('pyproject.toml', 'requirements*.txt', 'constraints*.txt') }} |
| 53 | + # restore-keys: | |
| 54 | + # hf-${{ runner.os }}- |
| 55 | + |
| 56 | + # - name: Checkout code |
| 57 | + # uses: actions/checkout@v4 |
| 58 | + # with: |
| 59 | + # fetch-depth: 0 |
| 60 | + |
| 61 | + # - name: Install tunix dependencies |
| 62 | + # run: | |
| 63 | + # pip install --upgrade pip |
| 64 | + # pip install -e .[prod] --force-reinstall |
| 65 | + # pip install pytest pytest-xdist |
| 66 | + |
| 67 | + # - name: Verify TPU availability |
| 68 | + # run: | |
| 69 | + # python -c " |
| 70 | + # import jax |
| 71 | + # print(f'JAX version: {jax.__version__}') |
| 72 | + # print(f'JAX devices: {jax.devices()}') |
| 73 | + |
| 74 | + # # Check if we have TPU devices specifically |
| 75 | + # devices = jax.devices() |
| 76 | + # has_tpu = len(devices) > 0 and all(device.platform == 'tpu' for device in devices) |
| 77 | + # print(f'TPU available: {has_tpu}') |
| 78 | + |
| 79 | + # if not has_tpu: |
| 80 | + # print('ERROR: No TPU devices found! Expected TPU devices but got:', [device.platform for device in devices]) |
| 81 | + # exit(1) |
| 82 | + # else: |
| 83 | + # print(f'SUCCESS: Found {len(devices)} TPU device(s)') |
| 84 | + # " |
| 85 | + |
| 86 | + # - name: Run tunix model tests |
| 87 | + # run: | |
| 88 | + # python -m pytest tests/models/ -v --tb=short -m "not cpu_only and not gpu_only" |
| 89 | + |
| 90 | + # - name: Run tunix generation tests (PASSED only) |
| 91 | + # run: | |
| 92 | + # # tokenizer_adapter_test requires access to gated repo |
| 93 | + # # TODO(b/459824938) Add back test_logprobs_extraction_with_missing_token after fixing the issue |
| 94 | + # python -m pytest tests/generate/ -v --tb=short \ |
| 95 | + # --ignore=tests/generate/vllm_sampler_test.py \ |
| 96 | + # --ignore=tests/generate/vllm_driver_test.py \ |
| 97 | + # --ignore=tests/generate/tokenizer_adapter_test.py \ |
| 98 | + # --ignore=tests/generate/sglang_jax_sampler_test.py \ |
| 99 | + # --ignore=tests/generate/utils_test.py |
| 100 | + |
| 101 | + # python -m pytest tests/generate/utils_test.py -k "not test_logprobs_extraction_with_missing_token" |
| 102 | + |
| 103 | + # - name: Run tunix SFT tests |
| 104 | + # run: | |
| 105 | + # python -m pytest tests/sft/ -v --tb=short |
| 106 | + |
| 107 | + # - name: Run tunix distillation tests |
| 108 | + # run: | |
| 109 | + # python -m pytest tests/distillation/ -v --tb=short |
| 110 | + |
| 111 | + # - name: Run tunix RL tests |
| 112 | + # run: | |
| 113 | + # # RL common tests that passed |
| 114 | + # # b/448133814: test_grpo_with_lora_model fails |
| 115 | + # python -m pytest tests/rl/ -v --tb=short -k "not test_grpo_with_lora_model" --ignore=tests/rl/experimental/agentic |
| 116 | + |
| 117 | + # - name: Run tunix tests not covered by the above categories |
| 118 | + # run: | |
| 119 | + # # This category is to catch tests added but not covered by CI yet. Whenever you add new folders under tests/, please add a new category above and skip those tests here. |
| 120 | + # python -m pytest tests/ -v --tb=short --ignore=tests/perf/ --ignore=tests/model_alignment/ --ignore=tests/models/ --ignore=tests/cli/ --ignore=tests/generate/ --ignore=tests/sft/ --ignore=tests/distillation/ --ignore=tests/rl/ || code=$? |
| 121 | + # if [ "${code:-0}" = "5" ]; then |
| 122 | + # echo "No tests collected (expected)." |
| 123 | + # exit 0 |
| 124 | + # else |
| 125 | + # exit "${code:-0}" |
| 126 | + # fi |
127 | 127 |
|
128 | 128 | run_dev: |
129 | 129 | if: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository }} |
|
0 commit comments