deepspeed

Форк
0
74 строки · 2.1 Кб
1
name: nv-mii
2

3
on:
4
  workflow_dispatch:
5
    inputs:
6
      mii_branch:
7
        description: 'DeepSpeed-MII Branch'
8
        required: false
9
        default: 'main'
10
        type: string
11
  pull_request:
12
    paths:
13
      - '.github/workflows/nv-mii.yml'
14
      - 'requirements/**'
15
      - 'setup.py'
16
      - 'deepspeed/__init__.py'
17
      - 'deepspeed/inference/**'
18
      - '!deepspeed/inference/v2/**' # exclude v2 dir
19
  merge_group:
20
    branches: [ master ]
21
  schedule:
22
    - cron: "0 0 * * *"
23

24
concurrency:
25
  group: ${{ github.workflow }}-${{ github.ref }}
26
  cancel-in-progress: true
27

28
jobs:
29
  unit-tests:
30
    runs-on: [self-hosted, nvidia, cu116, v100]
31

32
    steps:
33
      - uses: actions/checkout@v3
34

35
      - id: setup-venv
36
        uses: ./.github/workflows/setup-venv
37

38
      - name: Install pytorch
39
        run: |
40
          pip3 install -U --cache-dir $TORCH_CACHE torch --index-url https://download.pytorch.org/whl/cu118
41
          python -c "import torch; print('torch:', torch.__version__, torch)"
42
          python -c "import torch; print('CUDA available:', torch.cuda.is_available())"
43

44
      - name: Install transformers
45
        run: |
46
          git clone https://github.com/huggingface/transformers
47
          cd transformers
48
          # if needed switch to the last known good SHA until transformers@master is fixed
49
          # git checkout 1cc453d33
50
          git rev-parse --short HEAD
51
          pip install .
52

53
      - name: Install deepspeed
54
        run: |
55
          pip install .[dev]
56
          ds_report
57

58
      - name: Python environment
59
        run: |
60
          pip list
61

62
      - name: MII unit tests
63
        run: |
64
          BRANCH="main"
65
          if [[ ! -z "${{ github.event.inputs.mii_branch }}" ]]; then
66
              BRANCH="${{ github.event.inputs.mii_branch }}"
67
          fi
68
          echo "Cloning DeepSpeed-MII branch: $BRANCH"
69
          git clone -b $BRANCH --depth=1 https://github.com/microsoft/DeepSpeed-MII.git
70
          cd DeepSpeed-MII
71
          pip install .[dev]
72
          unset TORCH_CUDA_ARCH_LIST # only jit compile for current arch
73
          cd tests/legacy
74
          pytest $PYTEST_OPTS --forked -m "deepspeed" ./
75

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.