Skip to content

Weight compression PR#3842 #308

Weight compression PR#3842

Weight compression PR#3842 #308

name: Weight compression
run-name: "Weight compression${{ inputs.pr_num != '' && format(' PR#{0}', inputs.pr_num) || '' }}${{ inputs.pytest_args != '' && format(' [{0}]', inputs.pytest_args) || '' }}"
permissions: read-all
on:
workflow_call:
inputs:
pr_num:
description: 'The pull request number'
type: string
default: ''
pytest_args:
description: 'Pytest arguments'
type: string
default: ''
workflow_dispatch:
inputs:
pr_num:
description: 'The pull request number'
type: string
default: ''
pytest_args:
description: 'Pytest arguments'
type: string
default: ''
defaults:
run:
shell: bash
env:
PYTHON_VERSION: "3.12"
PYTEST_ARGS: ${{ inputs.pytest_args || '' }}
TQDM_DISABLE: 1
RESULT_XML: "pytest-results.xml"
HOME_HF: "/home/runner/hf_home"
jobs:
weight-compression-cpu:
name: Weight compression [${{ matrix.group }}/6]
runs-on: ubuntu-latest-16-cores
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
group: [1, 2, 3, 4, 5, 6]
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
ref: ${{ inputs.pr_num != '' && format('refs/pull/{0}/head', inputs.pr_num) || github.ref }}
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Install uv
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
- name: cpuinfo
run: cat /proc/cpuinfo
- name: Install NNCF and test requirements
run: uv pip install --system . -r tests/post_training/requirements.txt
- name: Print installed modules
run: pip list
- name: Run wc test scope
run: |
set +e
python -m pytest -s -ra tests/post_training/test_quantize_conformance.py::test_weight_compression \
--junit-xml=${{ env.RESULT_XML }} \
--durations-path=tests/post_training/data/wc_test_durations.json \
--splitting-algorithm=least_duration \
--splits 6 \
--group ${{ matrix.group }} \
${{ env.PYTEST_ARGS }}
ret=$?
[ $ret -eq 5 ] && [ -n "${{ env.PYTEST_ARGS }}" ] && exit 0 || exit $ret
- name: Print results.csv
if: ${{ !cancelled() }}
run: column -s, -t < tmp/results.csv || echo "no file"
- name: Upload artifact
if: ${{ !cancelled() }}
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a #v7.0.1
with:
name: wc_results_${{ matrix.group }}
path: tmp/results.csv
if-no-files-found: ignore
- name: Upload test results
if: ${{ !cancelled() }}
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: weight-compression-pytest-results-${{ matrix.group }}
path: ${{ env.RESULT_XML }}
retention-days: 7
summary:
name: Summary WC
if: ${{ !cancelled() }}
needs: weight-compression-cpu
uses: ./.github/workflows/call_summary.yml
with:
artifact_pattern: weight-compression-pytest-results-*