Skip to content

Commit dc9c744

Browse files
ci: add axolotl bnb kernel tests
Axolotl has no pytest marker for bnb, so we select the 3 relevant test targets explicitly: - tests/e2e/kernels/test_quantize.py (4 tests — dequantize + QuantState) - tests/e2e/kernels/test_lora.py (10 tests — LoRA autograd with QuantState) - tests/e2e/kernels/test_lora_features.py::TestQuantizedModels (2 tests — NF4 QLoRA forward/backward) Runner: A10G (bandb-aws-g5-4xlarge-plus). These are kernel-level tests that don't need large VRAM. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent af15686 commit dc9c744

1 file changed

Lines changed: 56 additions & 1 deletion

File tree

.github/workflows/tests-integration-nightly.yml

Lines changed: 56 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,61 @@ jobs:
210210
path: reports/
211211
retention-days: 7
212212

213+
test-axolotl:
214+
name: Axolotl bnb kernel tests
215+
if: github.repository == 'bitsandbytes-foundation/bitsandbytes'
216+
runs-on: bandb-aws-g5-4xlarge-plus-use1-public-80 # A10G
217+
steps:
218+
- name: Show GPU information
219+
run: nvidia-smi
220+
221+
- uses: actions/checkout@v4
222+
223+
- name: Setup Python
224+
uses: actions/setup-python@v5
225+
with:
226+
python-version: ${{ env.PYTHON_VERSION }}
227+
228+
- name: Install torch + bnb (from continuous-release)
229+
run: |
230+
pip install torch==${TORCH_VERSION} --index-url ${PYPI_INDEX}
231+
pip install "bitsandbytes[test] @ ${BNB_WHEEL_URL}"
232+
233+
- name: Install axolotl and clone matching tag
234+
run: |
235+
pip install axolotl transformers accelerate peft
236+
AXOLOTL_VERSION=$(pip show axolotl | awk '/^Version:/ {print $2}')
237+
echo "Installed axolotl v${AXOLOTL_VERSION}"
238+
git clone --depth=1 --branch "v${AXOLOTL_VERSION}" \
239+
https://github.com/axolotl-ai-cloud/axolotl.git /tmp/axolotl
240+
241+
- name: Show environment
242+
run: |
243+
pip list
244+
python -m torch.utils.collect_env
245+
246+
- name: Run axolotl bnb kernel tests
247+
working-directory: /tmp/axolotl
248+
shell: bash -o pipefail {0}
249+
run: |
250+
mkdir -p ${GITHUB_WORKSPACE}/reports
251+
python -m pytest \
252+
tests/e2e/kernels/test_quantize.py \
253+
tests/e2e/kernels/test_lora.py \
254+
"tests/e2e/kernels/test_lora_features.py::TestQuantizedModels" \
255+
-v \
256+
--junitxml=${GITHUB_WORKSPACE}/reports/axolotl.xml \
257+
-o junit_logging=all \
258+
2>&1 | tee ${GITHUB_WORKSPACE}/reports/axolotl.log
259+
260+
- name: Upload JUnit XML and log
261+
if: always()
262+
uses: actions/upload-artifact@v4
263+
with:
264+
name: reports-axolotl
265+
path: reports/
266+
retention-days: 7
267+
213268
test-peft:
214269
name: PEFT bnb tests (single GPU)
215270
if: github.repository == 'bitsandbytes-foundation/bitsandbytes'
@@ -332,7 +387,7 @@ jobs:
332387

333388
report:
334389
name: Consolidated report
335-
needs: [test-transformers, test-transformers-multigpu, test-diffusers, test-peft, test-peft-multigpu]
390+
needs: [test-transformers, test-transformers-multigpu, test-diffusers, test-axolotl, test-peft, test-peft-multigpu]
336391
if: always() && github.repository == 'bitsandbytes-foundation/bitsandbytes'
337392
runs-on: ubuntu-22.04
338393
steps:

0 commit comments

Comments
 (0)