Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
IlyasMoutawwakil committed Feb 10, 2025
1 parent 17b8291 commit b8fc49f
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 1 deletion.
41 changes: 40 additions & 1 deletion .github/workflows/slow_tests_gaudi2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ jobs:
name: Test Sentence Transformers integration
if: ${{ !cancelled() && (success() || failure()) }}
needs:
- trl
- trl # run the job when the previous test job is done
runs-on: [self-hosted, linux, x64, gaudi2, nightly]
steps:
- name: Checkout Optimum Habana
Expand Down Expand Up @@ -276,3 +276,42 @@ jobs:
--ipc=host \
vault.habana.ai/gaudi-docker/1.19.0/ubuntu22.04/habanalabs/pytorch-installer-2.5.1:latest \
/bin/bash optimum-habana/tests/ci/sentence_transformers.sh
accelerate:
name: Test Accelerate integration
if: ${{ !cancelled() && (success() || failure()) }}
needs:
- sentence-transformers # run the job when the previous test job is done
runs-on: [self-hosted, linux, x64, gaudi2, nightly]
steps:
- name: Checkout Optimum Habana
uses: actions/checkout@v2
with:
repository: 'huggingface/optimum-habana'
branch: 'upstream-accelerate'
path: optimum-habana
- name: Checkout Accelerate
uses: actions/checkout@v2
with:
repository: 'huggingface/accelerate'
branch: 'hpu-support'
path: accelerate
- name: Pull image
run: |
docker pull vault.habana.ai/gaudi-docker/1.19.0/ubuntu22.04/habanalabs/pytorch-installer-2.5.1:latest
- name: Run tests
run: |
docker run \
--rm \
-v $PWD:/root/workspace \
-v /scratch-1:/data \
--workdir=/root/workspace \
--runtime=habana \
-e HABANA_VISIBLE_DEVICES=all \
-e OMPI_MCA_btl_vader_single_copy_mechanism=none \
-e GAUDI2_CI=1 \
-e HF_HOME=/data \
--cap-add=sys_nice \
--net=host \
--ipc=host \
vault.habana.ai/gaudi-docker/1.19.0/ubuntu22.04/habanalabs/pytorch-installer-2.5.1:latest \
/bin/bash optimum-habana/tests/ci/acclerate.sh
10 changes: 10 additions & 0 deletions tests/ci/accelerate.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash

OPTIMUM_HABANA_PATH=${CI_OPTIMUM_HABANA_PATH:-/root/workspace/optimum-habana}
ACCELERATE_PATH=${CI_SENTENCE_TRANSFORMER_PATH:-/root/workspace/accelerate}

python -m pip install --upgrade pip
python -m pip install $OPTIMUM_HABANA_PATH[tests]
cd $ACCELERATE_PATH
python -m pip install .
RUN_SLOW=1 pytest tests/test_accelerator.py

0 comments on commit b8fc49f

Please sign in to comment.