nv-transformers-v100.yml 2.3 KB
Newer Older
1 2 3 4 5 6 7 8
name: nv-transformers-v100

on:
  push:
    branches:
      - 'staging**'
    paths-ignore:
      - 'docs/**'
9
      - 'blogs/**'
10 11 12
  pull_request:
    paths-ignore:
      - 'docs/**'
13
      - 'blogs/**'
M
Michael Wyatt 已提交
14 15
  schedule:
    - cron: "0 0 * * *"
16

17 18 19 20
concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: true

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

    steps:
26
      - uses: actions/checkout@v3
27

M
Michael Wyatt 已提交
28 29 30 31
      - id: setup-venv
        uses: ./.github/workflows/setup-venv

      - name: Install pytorch
32
        run: |
33
          # use the same pytorch version as transformers CI
34
          pip install --no-cache-dir torch torchvision torchaudio -f https://download.pytorch.org/whl/torch_stable.html
35 36
          python -c "import torch; print('torch:', torch.__version__, torch)"
          python -c "import torch; print('CUDA available:', torch.cuda.is_available())"
37

38 39 40 41
      - name: Install deepspeed
        run: |
          pip install .[dev,autotuning]
          ds_report
42

43 44 45 46
      - name: Python environment
        run: |
          pip list

47 48 49 50 51 52
      - 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
53
          #git checkout 6268694e2
54 55 56 57
          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
58
          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 {}
59 60
          # force datasets version due to issues
          pip install datasets==2.2.2
61 62 63
          # force protobuf version due to issues
          pip install "protobuf<4.21.0"
          pip list
64
          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