peft

Форк
0
/
integrations_tests.yml 
82 строки · 2.8 Кб
1
name: integration tests
2

3
on:
4
  workflow_dispatch:
5
    inputs:
6
      branch:
7
        description: 'Branch to test on'
8
        required: true
9

10
jobs:
11
  run_transformers_integration_tests:
12
    strategy:
13
      fail-fast: false
14
      matrix:
15
        transformers-version: ['main', 'latest']
16
    runs-on: ubuntu-latest
17
    steps:
18
      - uses: actions/checkout@v4
19
        with:
20
          ref: ${{ github.event.inputs.branch }}
21
          repository: ${{ github.event.pull_request.head.repo.full_name }}
22
      - name: Set up Python
23
        uses: actions/setup-python@v4
24
        with:
25
          python-version: "3.10"
26
          cache: "pip"
27
          cache-dependency-path: "setup.py"
28
      - name: print environment variables
29
        run: |
30
          echo "env.CI_BRANCH = ${{ env.CI_BRANCH }}"
31
          echo "env.CI_SHA = ${{ env.CI_SHA }}"
32
      - name: Install dependencies
33
        run: |
34
          python -m pip install --upgrade pip
35
          python -m pip install .[test]
36
          if [ "${{ matrix.transformers-version }}" == "main" ]; then
37
              pip install -U git+https://github.com/huggingface/transformers.git
38
          else
39
              echo "Nothing to do as transformers latest already installed"
40
          fi
41

42
      - name: Test transformers integration
43
        run: |
44
          cd .. && git clone https://github.com/huggingface/transformers.git && cd transformers/ && git rev-parse HEAD
45
          RUN_SLOW=1 pytest tests/peft_integration/test_peft_integration.py
46
  run_diffusers_integration_tests:
47
    strategy:
48
      fail-fast: false
49
      matrix:
50
        # For now diffusers integration is not on PyPI
51
        diffusers-version: ['main']
52
    runs-on: ubuntu-latest
53
    steps:
54
      - uses: actions/checkout@v4
55
        with:
56
          ref: ${{ github.event.inputs.branch }}
57
          repository: ${{ github.event.pull_request.head.repo.full_name }}
58
      - name: Set up Python
59
        uses: actions/setup-python@v4
60
        with:
61
          python-version: "3.10"
62
          cache: "pip"
63
          cache-dependency-path: "setup.py"
64
      - name: print environment variables
65
        run: |
66
          echo "env.CI_BRANCH = ${{ env.CI_BRANCH }}"
67
          echo "env.CI_SHA = ${{ env.CI_SHA }}"
68
      - name: Install dependencies
69
        run: |
70
          python -m pip install --upgrade pip
71
          python -m pip install .[test]
72
          
73
          if [ "${{ matrix.diffusers-version }}" == "main" ]; then
74
              pip install -U git+https://github.com/huggingface/diffusers.git
75
          else
76
              echo "Nothing to do as diffusers latest already installed"
77
          fi
78

79
      - name: Test diffusers integration
80
        run: |
81
          cd .. && git clone https://github.com/huggingface/diffusers.git && cd diffusers/ && git rev-parse HEAD
82
          pytest tests/lora/test_lora_layers_peft.py
83

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

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

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

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