Skip to content

BNB tests on Pull Requests #14

BNB tests on Pull Requests

BNB tests on Pull Requests #14

Workflow file for this run

name: BNB tests on Pull Requests
on:
workflow_dispatch:
inputs:
pr_number:
description: 'PR number'
required: true
env:
# To be able to run tests on CUDA 12.2
NVIDIA_DISABLE_REQUIRE: "1"
jobs:
run_tests_single_gpu:
strategy:
fail-fast: false
runs-on: [self-hosted, single-gpu, nvidia-gpu, t4, ci]
container:
image: "huggingface/peft-gpu-bnb-latest:latest"
options: --gpus all --shm-size "16gb" --ipc host -v /mnt/cache/.cache/huggingface:/mnt/cache/
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v3
- name: Configure Git Safe Directory
run: |
git config --global --add safe.directory ${GITHUB_WORKSPACE}
- name: Pip install and checkout
run: |
source activate peft
pip uninstall -y bitsandbytes
git remote add upstream https://github.com/TimDettmers/bitsandbytes.git
git fetch upstream pull/${{ github.event.inputs.pr_number }}/head:test-pr
git checkout test-pr
cmake -B . -DCOMPUTE_BACKEND=cuda -S . && cmake --build . && pip install -e . && pip freeze | grep bitsandbytes
echo "$(which pip)"
echo "$(which python)"
python -m pip install --no-cache-dir ".[test]" pytest
- name: Show bitsandbytes and its versions
run: git log --oneline -n 5 # Shows the last 5 commits to verify the correct commit is checked out
- name: Run core tests on single GPU
id: tests
if: always()
run: |
source activate peft
pip list
pytest tests/
- name: Post to Slack
if: always()
uses: huggingface/transformers/.github/actions/post-slack@main
with:
slack_channel: "C06ALV91VML" # channel: #bnb-daily-ci-collab
title: 🤗 Results of the bitsandbytes tests
status: ${{ steps.tests.conclusion}}
slack_token: ${{ secrets.SLACK_CIFEEDBACK_BOT_TOKEN }}