nv-transformers-v100.yml 2.4 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13
name: nv-transformers-v100

on:
  push:
    branches:
      - 'master'
      - 'staging**'
    paths-ignore:
      - 'docs/**'
  pull_request:
    paths-ignore:
      - 'docs/**'

14 15 16 17
concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: true

18 19
jobs:
  unit-tests:
20
    runs-on: [self-hosted, nvidia, cu111, v100]
21 22 23 24 25 26

    steps:
      - uses: actions/checkout@v2

      - name: environment
        run: |
27
          echo "JobID: $AISC_NODE_INSTANCE_ID"
28 29 30 31 32
          nvidia-smi
          which python
          python --version
          which nvcc
          nvcc --version
33 34
          pip install --upgrade pip
          pip uninstall --yes torch torchvision
35 36 37
          pip install torch==1.8.2+cu111 torchvision==0.9.2+cu111 -f https://download.pytorch.org/whl/lts/1.8/torch_lts.html
          python -c "import torch; print('torch:', torch.__version__, torch)"
          python -c "import torch; print('CUDA available:', torch.cuda.is_available())"
38 39
          sudo apt-get update
          sudo apt-get install -y libaio-dev
40 41 42 43 44

      - name: Python environment
        run: |
          pip list

45 46
      - name: Install deepspeed
        run: |
47
          pip uninstall --yes deepspeed
48 49
          pip install .[dev,autotuning]
          ds_report
50

51 52 53 54 55 56
      - name: HF transformers tests
        run: |
          if [[ -d ./torch-extensions ]]; then rm -rf ./torch-extensions; fi
          git clone https://github.com/huggingface/transformers
          cd transformers
          # if needed switch to the last known good SHA until transformers@master is fixed
57
          git checkout 6268694e2
58 59 60 61
          git rev-parse --short HEAD
          # scipy/sklearn required for tests, using the 'dev' extra forces torch re-install
          pip install .[testing]
          # find reqs used in ds integration tests
62
          find examples/pytorch -regextype posix-egrep -regex '.*(language-modeling|question-answering|summarization|image-classification|text-classification|translation).*/requirements.txt' -exec grep -v 'torch' {} \; | xargs -I {} pip install --upgrade {}
63 64
          # force datasets version due to issues
          pip install datasets==2.2.2
65 66 67
          # force protobuf version due to issues
          pip install "protobuf<4.21.0"
          pip list
68
          HF_DATASETS_CACHE=/blob/datasets_cache/ TRANSFORMERS_CACHE=/blob/transformers_cache/ WANDB_DISABLED=true TORCH_EXTENSIONS_DIR=./torch-extensions RUN_SLOW=1 pytest --color=yes --durations=0 --verbose tests/deepspeed