-
Notifications
You must be signed in to change notification settings - Fork 453
139 lines (132 loc) · 4.75 KB
/
test-check-transformers.yaml
File metadata and controls
139 lines (132 loc) · 4.75 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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
name: Test Checks (Transformers)
on:
pull_request:
branches: [ main, 'release/*' ]
types: [ labeled, synchronize ]
push:
branches: [ main, 'release/*' ]
merge_group:
workflow_dispatch:
inputs:
code_coverage:
description: if enabled, code coverage metrics will be collected during the test run
type: boolean
default: false
env:
CADENCE: "commit"
HF_TOKEN: ${{ secrets.HF_TOKEN_READ }}
UV_SYSTEM_PYTHON: 1
UV_TORCH_BACKEND: "auto"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
detect-changes:
runs-on: gcp-k8s-vllm-util
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: ibm-wdc-k8s-vllm-h100-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.12'
- uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-tags: true
- name: Install uv
uses: astral-sh/setup-uv@v6
- name: "⚙️ Install dependencies"
run: uv pip install .[dev]
- uses: actions/checkout@v4
with:
repository: "vllm-project/compressed-tensors"
path: "compressed-tensors"
fetch-depth: 0
fetch-tags: true
- name: "⚙️ Install compressed-tensors dependencies"
id: install
run: |
uv pip uninstall compressed-tensors
export GIT_CEILING_DIRECTORIES="$(pwd)"
cd compressed-tensors
BUILD_TYPE=nightly uv pip install .
- name: "Clean compressed-tensors directory"
run: rm -r compressed-tensors/
- name: "⚙️ Prepare code coverage"
if: inputs.code_coverage
uses: ./.github/actions/prepare-code-coverage
- name: "🔬 Running compression tests"
if: (success() || failure()) && steps.install.outcome == 'success'
run: |
pytest -vra tests/llmcompressor/transformers/compression
- name: Run Data Tests
if: (success() || failure()) && steps.install.outcome == 'success'
run: |
pytest -vra tests/llmcompressor/transformers/data
- name: Running GPTQ Tests
if: (success() || failure()) && steps.install.outcome == 'success'
run: |
pytest -vra tests/llmcompressor/transformers/gptq
- name: Running AutoRound Tests
if: (success() || failure()) && steps.install.outcome == 'success'
run: |
pytest -vra tests/llmcompressor/transformers/autoround
- name: Running ONESHOT Tests
if: (success() || failure()) && steps.install.outcome == 'success'
run: |
pytest -vra tests/llmcompressor/transformers/oneshot
- name: Running SparseGPT Tests
if: (success() || failure()) && steps.install.outcome == 'success'
run: |
pytest -vra tests/llmcompressor/transformers/sparsegpt
- name: Running Tracing Tests
if: (success() || failure()) && steps.install.outcome == 'success'
run: |
pytest -vra tests/llmcompressor/transformers/tracing
- name: Running KV Cache Tests
if: (success() || failure()) && steps.install.outcome == 'success'
run: |
pytest -vra tests/llmcompressor/transformers/kv_cache
- name: "Upload coverage report"
if: (success() || failure()) && inputs.code_coverage
uses: actions/upload-artifact@v4
with:
name: transformers-tests-coverage-results
path: |
.coverage
coverage-html
coverage.json
include-hidden-files: true
retention-days: 5
- name: "Report coverage"
if: (success() || failure()) && inputs.code_coverage
run: |
coverage report --data-file=".coverage" --skip-empty --format="markdown" > "$GITHUB_STEP_SUMMARY"