Skip to content

Commit 9aedc8b

Browse files
authored
Fix versioning for source installs (#1370)
SUMMARY: Update the various source installs in testing workflows to properly fetch git tags and set the `BUILD_TYPE` to nightly. This notably results in installing a nightly-style version of `compressed-tensors` for the source install to allow it to satisfy the version requirements from `llm-compressor`. TEST PLAN: Prior to these changes, you would find a broken `llm-compressor` version in the local install, as well as a warning about the source install version of `compressed-tensors` being incompatible: ``` Successfully installed […] llmcompressor-0.1.dev1+g67614d5 […] ... Installing collected packages: compressed-tensors ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts. llmcompressor 0.1.dev1+g8ca8fd3 requires compressed-tensors>=0.9.4a2, but you have compressed-tensors 0.1.dev1+g16e6435 which is incompatible. Successfully installed compressed-tensors-0.1.dev1+g16e6435 ``` With the changes, both packages have proper versioning and no compatibility complaints: ``` Successfully installed […] llmcompressor-0.5.1.dev28+g3b1aac94 […] ... Installing collected packages: compressed-tensors Successfully installed compressed-tensors-0.9.4a20250421 ``` --------- Signed-off-by: Domenic Barbuzzi <[email protected]>
1 parent 76af7af commit 9aedc8b

File tree

2 files changed

+37
-9
lines changed

2 files changed

+37
-9
lines changed

.github/workflows/test-check-transformers.yaml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,17 +51,24 @@ jobs:
5151
with:
5252
python-version: '3.9'
5353
- uses: actions/checkout@v4
54+
with:
55+
fetch-depth: 0
56+
fetch-tags: true
5457
- name: "⚙️ Install dependencies"
5558
run: pip3 install -U pip setuptools && pip3 install .[dev]
5659
- uses: actions/checkout@v4
5760
with:
5861
repository: "neuralmagic/compressed-tensors"
5962
path: "compressed-tensors"
63+
fetch-depth: 0
64+
fetch-tags: true
6065
- name: "⚙️ Install compressed-tensors dependencies"
6166
id: install
6267
run: |
63-
pip3 uninstall -y compressed-tensors compressed-tensors-nightly
64-
pip3 install ./compressed-tensors/
68+
pip3 uninstall -y compressed-tensors
69+
export GIT_CEILING_DIRECTORIES="$(pwd)"
70+
cd compressed-tensors
71+
BUILD_TYPE=nightly pip3 install .
6572
- name: "Clean compressed-tensors directory"
6673
run: rm -r compressed-tensors/
6774
- name: "🔬 Running transformers tests"

.github/workflows/test-check.yaml

Lines changed: 28 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44

55
env:
66
CADENCE: "commit"
7-
7+
88
jobs:
99

1010
base-tests:
@@ -14,16 +14,23 @@ jobs:
1414
with:
1515
python-version: '3.12'
1616
- uses: actions/checkout@v4
17+
with:
18+
fetch-depth: 0
19+
fetch-tags: true
1720
- name: "⚙️ Install dependencies"
1821
run: pip3 install -U pip setuptools && pip3 install .[dev]
1922
- uses: actions/checkout@v4
2023
with:
2124
repository: "neuralmagic/compressed-tensors"
2225
path: "compressed-tensors"
26+
fetch-depth: 0
27+
fetch-tags: true
2328
- name: "⚙️ Install compressed-tensors dependencies"
2429
run: |
25-
pip3 uninstall -y compressed-tensors compressed-tensors-nightly
26-
pip3 install ./compressed-tensors/
30+
pip3 uninstall -y compressed-tensors
31+
export GIT_CEILING_DIRECTORIES="$(pwd)"
32+
cd compressed-tensors
33+
BUILD_TYPE=nightly pip3 install .
2734
- name: "Clean compressed-tensors directory"
2835
run: rm -r compressed-tensors/
2936
- name: "🔬 Running base tests"
@@ -36,16 +43,23 @@ jobs:
3643
with:
3744
python-version: '3.11'
3845
- uses: actions/checkout@v4
46+
with:
47+
fetch-depth: 0
48+
fetch-tags: true
3949
- name: "⚙️ Install dependencies"
4050
run: pip3 install -U pip setuptools && pip3 install .[dev]
4151
- uses: actions/checkout@v4
4252
with:
4353
repository: "neuralmagic/compressed-tensors"
4454
path: "compressed-tensors"
55+
fetch-depth: 0
56+
fetch-tags: true
4557
- name: "⚙️ Install compressed-tensors dependencies"
4658
run: |
47-
pip3 uninstall -y compressed-tensors compressed-tensors-nightly
48-
pip3 install ./compressed-tensors/
59+
pip3 uninstall -y compressed-tensors
60+
export GIT_CEILING_DIRECTORIES="$(pwd)"
61+
cd compressed-tensors
62+
BUILD_TYPE=nightly pip3 install .
4963
- name: "Clean compressed-tensors directory"
5064
run: rm -r compressed-tensors/
5165
- name: "🔬 Running pytorch tests"
@@ -59,16 +73,23 @@ jobs:
5973
with:
6074
python-version: '3.10'
6175
- uses: actions/checkout@v4
76+
with:
77+
fetch-depth: 0
78+
fetch-tags: true
6279
- name: "⚙️ Install dependencies"
6380
run: pip3 install -U pip setuptools && pip3 install .[dev]
6481
- uses: actions/checkout@v4
6582
with:
6683
repository: "neuralmagic/compressed-tensors"
6784
path: "compressed-tensors"
85+
fetch-depth: 0
86+
fetch-tags: true
6887
- name: "⚙️ Install compressed-tensors dependencies"
6988
run: |
70-
pip3 uninstall -y compressed-tensors compressed-tensors-nightly
71-
pip3 install ./compressed-tensors/
89+
pip3 uninstall -y compressed-tensors
90+
export GIT_CEILING_DIRECTORIES="$(pwd)"
91+
cd compressed-tensors
92+
BUILD_TYPE=nightly pip3 install .
7293
- name: "Clean compressed-tensors directory"
7394
run: rm -r compressed-tensors/
7495
- name: "🔬 Running pytorch tests"

0 commit comments

Comments
 (0)