feat: support NPU and vLLM #351
Workflow file for this run
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | name: Unit Tests | |
| on: | |
| pull_request: | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| concurrency: | |
| group: areal-unit-tests-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| unit-tests: | |
| environment: | |
| name: AReaL-unittests | |
| permissions: | |
| contents: read | |
| runs-on: gpu | |
| timeout-minutes: 7200 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - run: | | |
| source examples/env/setup-pip-deps.sh | |
| - name: Wait for 2 free GPUs | |
| timeout-minutes: 7200 | |
| run: | | |
| until [[ $(echo "$CUDA_VISIBLE_DEVICES" | tr ',' '\n' | wc -l) -ge 2 ]]; do | |
| CUDA_VISIBLE_DEVICES="$(nvidia-smi --query-gpu=index,memory.free,memory.total --format=csv,noheader,nounits | awk -F',' '$2/$3 >= 0.90 {print $1}' | tr '\n' ',' | sed 's/,$//')" | |
| sleep 1 | |
| done | |
| echo "CUDA_VISIBLE_DEVICES=$CUDA_VISIBLE_DEVICES" >> "$GITHUB_ENV" | |
| - name: Run unit tests | |
| env: | |
| CI: true | |
| run: | | |
| TOKENIZERS_PARALLELISM=false HF_ENDPOINT=https://hf-mirror.com AREAL_IS_IN_CI=1 pytest -s -vv areal/tests/test_*.py |