Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
130 changes: 88 additions & 42 deletions .github/workflows/test-check-transformers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,49 +15,95 @@ env:
CLEARML_API_SECRET_KEY: ${{ secrets.CLEARML_API_SECRET_KEY }}

jobs:
transformers-tests:
runs-on: gcp-k8s-vllm-l4-solo
if: contains(github.event.pull_request.labels.*.name, 'ready') || github.event_name == 'push'
detect-changes:
runs-on: ubuntu-latest

outputs:
changes-present: ${{ steps.changed-files.outputs.any_modified }}

steps:
- uses: actions/setup-python@v5
- name: Checkout
uses: actions/checkout@v4
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
fetch-depth: 0

- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v45
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
pytest tests/llmcompressor/transformers/test_clear_ml.py -v
- name: Running OBCQ Tests
if: (success() || failure()) && steps.install.outcome == 'success'
files_ignore: |
examples/**
tests/e2e/**
tests/lmeval/**
tests/examples/**
**/*.md
.github/workflows/*

- name: Log relevant output
run: |
pytest -v tests/llmcompressor/transformers/obcq
echo "changes-present: ${{ steps.changed-files.outputs.any_modified }}"
echo "all modified files: ${{ steps.changed-files.outputs.all_modified_files }}"
shell: bash

downstream:
needs: [detect-changes]
if: needs.detect-changes.outputs.changes-present == 'true'
runs-on: ubuntu-latest
steps:
- name: comparison-boolean-explicit
if: needs.detect-changes.outputs.changes-present == true
run: echo "Hello, world!"
- name: comparison-boolean-implicit
if: needs.detect-changes.outputs.changes-present
run: echo "Hello, world!"
- name: comparison-string
if: needs.detect-changes.outputs.changes-present == 'true'
run: echo "Hello, world!"

# 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.changes-present
# 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
# pytest tests/llmcompressor/transformers/test_clear_ml.py -v
# - name: Running OBCQ Tests
# if: (success() || failure()) && steps.install.outcome == 'success'
# run: |
# pytest -v tests/llmcompressor/transformers/obcq
2 changes: 2 additions & 0 deletions src/llmcompressor/transformers/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
"""
Tools for integrating LLM Compressor with transformers training flows

Also, kwyjibo.
"""

# flake8: noqa
Expand Down