-
Notifications
You must be signed in to change notification settings - Fork 456
94 lines (88 loc) · 3.24 KB
/
test-check-transformers.yaml
File metadata and controls
94 lines (88 loc) · 3.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
name: Test Checks (Transformers)
on:
pull_request:
branches: main
types: [ labeled, synchronize ]
push:
branches: main
env:
CADENCE: "commit"
jobs:
detect-changes:
runs-on: ubuntu-latest
outputs:
matched-changes: ${{ steps.changed-files.outputs.all_changed_files }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Get changed files
id: changed-files
uses: neuralmagic/nm-actions/actions/changed-files@14cecb6bf54cc9919b1d3f64881a364401b2ae62 # v1.16.0
with:
include-patterns: |-
^src/
^tests/
^\.github/workflows/test-check-transformers\.yaml$
^MANIFEST\.in$
^setup\.py$
exclude-patterns: |-
^tests/e2e/
^tests/lmeval/
^tests/examples/
\.md$
- name: Log relevant output
run: |
echo "all changed files: ${{ steps.changed-files.outputs.all_changed_files }}"
shell: bash
transformers-tests:
needs: [detect-changes]
runs-on: gcp-k8s-vllm-l4-solo
if: (contains(github.event.pull_request.labels.*.name, 'ready') || github.event_name == 'push') && needs.detect-changes.outputs.matched-changes != ''
steps:
- uses: actions/setup-python@v5
with:
python-version: '3.9'
- uses: actions/checkout@v4
- name: "⚙️ Install dependencies"
run: pip3 install -U pip setuptools && pip3 install .[dev]
- uses: actions/checkout@v4
with:
repository: "neuralmagic/compressed-tensors"
path: "compressed-tensors"
- name: "⚙️ Install compressed-tensors dependencies"
id: install
run: |
pip3 uninstall -y compressed-tensors compressed-tensors-nightly
pip3 install ./compressed-tensors/
- name: "Clean compressed-tensors directory"
run: rm -r compressed-tensors/
- name: "🔬 Running transformers tests"
if: (success() || failure()) && steps.install.outcome == 'success'
run: |
pytest -v tests/llmcompressor/transformers/compression
- name: Run Finetune Tests
if: (success() || failure()) && steps.install.outcome == 'success'
run: |
pytest -v tests/llmcompressor/transformers/finetune
- name: Running GPTQ Tests
if: (success() || failure()) && steps.install.outcome == 'success'
run: |
pytest -v tests/llmcompressor/transformers/gptq
- name: Running ONESHOT Tests
if: (success() || failure()) && steps.install.outcome == 'success'
run: |
pytest -v tests/llmcompressor/transformers/oneshot
- name: Running Sparsification Tests
if: (success() || failure()) && steps.install.outcome == 'success'
run: |
pytest tests/llmcompressor/transformers/sparsification -v
- name: Running OBCQ Tests
if: (success() || failure()) && steps.install.outcome == 'success'
run: |
pytest -v tests/llmcompressor/transformers/obcq
- name: Running Tracing Tests
if: (success() || failure()) && steps.install.outcome == 'success'
run: |
pytest -v tests/llmcompressor/transformers/tracing