Skip to content

Signed-off-by: Aidan Reilly aireilly@redhat.com #4

Signed-off-by: Aidan Reilly aireilly@redhat.com

Signed-off-by: Aidan Reilly aireilly@redhat.com #4

Workflow file for this run

name: Test Checks (Base/PyTorch)
on:
pull_request:
branches:
- main
push:
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"
jobs:
base-tests:
runs-on: ubuntu-22.04
steps:
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-tags: true
- name: "⚙️ Install dependencies"
run: pip3 install -U pip setuptools && pip3 install .[dev]
- uses: actions/checkout@v4
with:
repository: "neuralmagic/compressed-tensors"
path: "compressed-tensors"
fetch-depth: 0
fetch-tags: true
- name: "⚙️ Install compressed-tensors dependencies"
run: |
pip3 uninstall -y compressed-tensors
export GIT_CEILING_DIRECTORIES="$(pwd)"
cd compressed-tensors
BUILD_TYPE=nightly pip3 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 base tests"
run: make test
- name: "Upload coverage report"
if: (success() || failure()) && inputs.code_coverage
uses: actions/upload-artifact@v4
with:
name: base-tests-coverage-results
path: |
.coverage
coverage-html
coverage.json
retention-days: 5
pytorch-tests:
runs-on: ubuntu-22.04
steps:
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-tags: true
- name: "⚙️ Install dependencies"
run: pip3 install -U pip setuptools && pip3 install .[dev]
- uses: actions/checkout@v4
with:
repository: "neuralmagic/compressed-tensors"
path: "compressed-tensors"
fetch-depth: 0
fetch-tags: true
- name: "⚙️ Install compressed-tensors dependencies"
run: |
pip3 uninstall -y compressed-tensors
export GIT_CEILING_DIRECTORIES="$(pwd)"
cd compressed-tensors
BUILD_TYPE=nightly pip3 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 pytorch tests"
run: |
pytest -v tests/llmcompressor/pytorch
- name: "Upload coverage report"
if: (success() || failure()) && inputs.code_coverage
uses: actions/upload-artifact@v4
with:
name: pytorch-tests-coverage-results
path: |
.coverage
coverage-html
coverage.json
retention-days: 5
compat-pytorch-1_9-pytorch-tests:
runs-on: ubuntu-22.04
steps:
- uses: actions/setup-python@v5
with:
python-version: '3.10'
- uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-tags: true
- name: "⚙️ Install dependencies"
run: pip3 install -U pip setuptools && pip3 install .[dev]
- uses: actions/checkout@v4
with:
repository: "neuralmagic/compressed-tensors"
path: "compressed-tensors"
fetch-depth: 0
fetch-tags: true
- name: "⚙️ Install compressed-tensors dependencies"
run: |
pip3 uninstall -y compressed-tensors
export GIT_CEILING_DIRECTORIES="$(pwd)"
cd compressed-tensors
BUILD_TYPE=nightly pip3 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 pytorch tests"
run: |
pytest -v tests/llmcompressor/pytorch
- name: "Upload coverage report"
if: (success() || failure()) && inputs.code_coverage
uses: actions/upload-artifact@v4
with:
name: compat-pytorch-tests-coverage-results
path: |
.coverage
coverage-html
coverage.json
retention-days: 5