Skip to content

Commit 2279181

Browse files
committed
Merge remote-tracking branch 'origin' into kylesayrs/r3-only
2 parents 773de39 + 07f3b78 commit 2279181

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+973
-558
lines changed

.github/actions/test/action.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@ inputs:
99
required: true
1010
code_coverage:
1111
description: whether to collect code coverage metrics during test run
12-
type: boolean
13-
default: false
12+
default: 'false'
1413
outputs:
1514
status:
1615
description: "final status from test"
@@ -51,7 +50,7 @@ runs:
5150
5251
if [[ "${ENABLE_COVERAGE}" == "true" ]]; then
5352
echo "::group::Installing code coverage requirements via pip"
54-
pip install bashlex https://github.com/neuralmagic/pytest-nm-releng/archive/v0.4.0.tar.gz
53+
pip install https://github.com/neuralmagic/pytest-nm-releng/archive/v0.4.0.tar.gz
5554
pip install coverage pytest-cov
5655
5756
# Adding Code coverage to the tests
@@ -76,7 +75,7 @@ runs:
7675
fi
7776
echo "::endgroup::"
7877
fi
79-
78+
8079
deactivate
8180
exit ${SUCCESS}
8281
shell: bash
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: Post-release nightly build & release
2+
3+
on:
4+
release:
5+
types: [released]
6+
7+
jobs:
8+
BUILD-TEST-NIGHTLY:
9+
name: Post-release nightly build & release
10+
uses: ./.github/workflows/trigger-all.yml
11+
with:
12+
wf_category: NIGHTLY
13+
push_to_pypi: true
14+
gitref: main
15+
secrets: inherit

.github/workflows/test-check.yaml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,10 @@ on:
1212

1313
jobs:
1414
python-tests:
15-
runs-on: ubuntu-24.04
15+
runs-on: k8s-util
16+
env:
17+
HF_HOME: /model-cache
18+
HF_TOKEN: ${{ secrets.NM_HF_TOKEN_READ_ONLY }}
1619
steps:
1720
- uses: actions/setup-python@v5
1821
with:
@@ -21,11 +24,13 @@ jobs:
2124
with:
2225
fetch-depth: 0
2326
fetch-tags: true
27+
- name: Install system dependencies
28+
run: |-
29+
sudo apt-get update
30+
sudo apt-get install -y --no-install-recommends g++ gcc make
2431
- name: Set Env
25-
run: |
26-
pip3 install --upgrade pip && pip3 install --upgrade setuptools
32+
run: pip3 install --upgrade pip setuptools
2733
- name: "⚙️ Install dependencies"
2834
run: pip3 install .[dev,accelerate]
2935
- name: "🔬 Running tests"
3036
run: make test
31-

.github/workflows/test.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,9 @@ jobs:
7171
contents: 'read'
7272
id-token: 'write'
7373
pages: 'write'
74+
env:
75+
HF_HOME: /model-cache
76+
HF_TOKEN: ${{ secrets.NM_HF_TOKEN_READ_ONLY }}
7477
environment:
7578
name: github-pages
7679
url: ${{ steps.coverage.outputs.page_url }}
@@ -89,6 +92,12 @@ jobs:
8992
with:
9093
python-version: ${{ inputs.python }}
9194

95+
- name: install system dependencies
96+
run: |-
97+
sudo apt-get update
98+
sudo apt-get install -y --no-install-recommends g++ gcc make
99+
shell: bash
100+
92101
- name: checkout code
93102
id: checkout
94103
uses: actions/checkout@v4
@@ -162,7 +171,7 @@ jobs:
162171
uses: actions/upload-artifact@v4
163172
if: success() || failure()
164173
with:
165-
name: report-${{ inputs.test_label }}.xml
174+
name: report-${{ inputs.python }}-${{ inputs.test_label }}.xml
166175
path: test-results/report.xml
167176
retention-days: 5
168177

.github/workflows/trigger-all.yml

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,21 @@ on:
55
# * is a special character in YAML so you have to quote this string
66
- cron: '30 0 * * *' # nightly run
77

8+
workflow_call:
9+
inputs:
10+
wf_category:
11+
description: "workflow category, must be 'NIGHTLY' or 'RELEASE' (default: NIGHTLY)"
12+
type: string
13+
default: NIGHTLY
14+
push_to_pypi:
15+
description: "when set and tests pass, then '.whl' & '.tar.gz' will be pushed to public pypi"
16+
type: boolean
17+
default: false
18+
gitref:
19+
description: "git commit hash or tag name"
20+
type: string
21+
default: 'main'
22+
823
workflow_dispatch:
924
inputs:
1025
wf_category:
@@ -19,7 +34,7 @@ on:
1934
type: boolean
2035
default: false
2136
gitref:
22-
description: "git commit hash or tag name"
37+
description: "git commit hash or tag name"
2338
type: string
2439
default: 'main'
2540

@@ -32,9 +47,8 @@ jobs:
3247
wf_category: ${{ inputs.wf_category || 'NIGHTLY' }}
3348
gitref: ${{ inputs.gitref || 'main' }}
3449
push_to_pypi: ${{ (github.event.schedule == '30 0 * * *') || inputs.push_to_pypi || false }}
35-
test_configs: '[{"python":"3.11.4","label":"ubuntu-24.04","timeout":"40","code_coverage":true},
36-
{"python":"3.10.12","label":"ubuntu-22.04","timeout":"40"},
50+
test_configs: '[{"python":"3.11.4","label":"k8s-util","timeout":"40","code_coverage":true},
51+
{"python":"3.10.12","label":"k8s-util","timeout":"40"},
3752
{"python":"3.9.17","label":"k8s-h100-solo","timeout":"40"},
3853
{"python":"3.12.6","label":"k8s-a100-duo","timeout":"40"}]'
39-
4054
secrets: inherit

examples/llama_1.1b/ex_llmcompressor_quantization.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
from pathlib import Path
2525

2626
import torch
27-
from llmcompressor.transformers import oneshot
27+
from llmcompressor import oneshot
2828

2929

3030
recipe = str(Path(__file__).parent / "example_quant_recipe.yaml")

examples/quantize_and_pack_int4.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@
144144
"outputs": [],
145145
"source": [
146146
"quantization_config_dict = {\n",
147-
"\t\"quant_method\": \"sparseml\",\n",
147+
"\t\"quant_method\": \"compressed-tensors\",\n",
148148
"\t\"format\": \"pack-quantized\",\n",
149149
"\t\"global_compression_ratio\": None,\n",
150150
"\t\"config_groups\": {\n",

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ def _setup_packages() -> List:
8888
)
8989

9090
def _setup_install_requires() -> List:
91-
return ["torch>=1.7.0", "transformers", "pydantic>=2.0", "frozendict"]
91+
return ["torch>=1.7.0", "transformers", "pydantic>=2.0", "loguru"]
9292

9393
def _setup_extras() -> Dict:
9494
return {

src/compressed_tensors/__init__.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,11 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15+
# flake8: noqa
16+
# isort: off
17+
from .logger import LoggerConfig, configure_logger, logger
1518
from .base import *
1619

17-
# flake8: noqa
1820
from .compressors import *
1921
from .config import *
2022
from .quantization import QuantizationConfig, QuantizationStatus

0 commit comments

Comments
 (0)