Skip to content

Commit 9cd5100

Browse files
committed
ci: Constrain all dependencies
Signed-off-by: Ihar Hrachyshka <ihar.hrachyshka@gmail.com>
1 parent 1532531 commit 9cd5100

12 files changed

Lines changed: 113 additions & 33 deletions

.github/actions/run-smoke/action.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ runs:
3434
run: |
3535
python${{ inputs.python-version }} -m venv --upgrade-deps venv
3636
. venv/bin/activate
37-
pip install tox
37+
pip install tox -c constraints-dev.txt
3838
3939
# flash-attn has a bug in the setup.py that causes pip to attempt
4040
# installing it before torch is installed. This is a bug because their
@@ -46,7 +46,7 @@ runs:
4646
run: |
4747
source venv/bin/activate
4848
# The list is taken from the pull request linked above
49-
pip install torch packaging setuptools wheel psutil ninja
49+
pip install torch packaging setuptools wheel psutil ninja -c constraints-dev.txt
5050
5151
- name: "Install tox-current-env to reuse the venv with pre-installed build dependencies"
5252
shell: bash
@@ -59,8 +59,9 @@ runs:
5959
run: |
6060
source venv/bin/activate
6161
tox -e py3-smoke --print-deps-to-file=./deps.txt
62-
pip install -r ./deps.txt --no-build-isolation
63-
pip install .
62+
pip_install="pip install -c constraints-dev.txt"
63+
$pip_install -r ./deps.txt --no-build-isolation
64+
$pip_install .
6465
6566
- name: "Show disk utilization BEFORE tests"
6667
shell: bash
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Update constraints-dev.txt
2+
3+
on:
4+
schedule:
5+
- cron: '0 3 * * 1' # Every Monday at 03:00 UTC
6+
workflow_dispatch:
7+
8+
jobs:
9+
update-constraints:
10+
runs-on: ubuntu-latest
11+
permissions:
12+
contents: write
13+
pull-requests: write
14+
15+
steps:
16+
- name: Checkout repository
17+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
18+
19+
- name: Set up Python
20+
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
21+
with:
22+
python-version: '3.11'
23+
24+
- name: Install tox
25+
run: python -m pip install --upgrade pip tox -c constraints-dev.txt
26+
27+
- name: Run tox constraints
28+
run: tox -e constraints
29+
30+
- name: git diff
31+
run: |
32+
git diff constraints-dev.txt
33+
34+
- name: set release date
35+
run: |
36+
echo "date=$(date --rfc-3339=date)" >> "${GITHUB_ENV}"
37+
38+
- name: Create Pull Request
39+
uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e # v7.0.8
40+
with:
41+
signoff: true
42+
commit-message: "chore: update constraints-dev.txt (${{ env.date }})"
43+
title: "chore: update constraints-dev.txt (${{ env.date }})"
44+
body: |
45+
This PR updates the constraints-dev.txt file using `tox -e constraints`.
46+
branch: update-constraints
47+
token: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }}

.github/workflows/e2e-nvidia-l40s-x4.yml

Lines changed: 5 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -177,27 +177,15 @@ jobs:
177177
- name: Install ilab
178178
working-directory: ./instructlab
179179
run: |
180-
export CUDA_HOME="/usr/local/cuda"
181-
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/local/cuda/lib64:/usr/local/cuda/extras/CUPTI/lib64"
182-
export PATH="$PATH:$CUDA_HOME/bin"
183-
python3.11 -m venv --upgrade-deps venv
184-
. venv/bin/activate
185-
nvidia-smi
186-
python3.11 -m pip cache remove llama_cpp_python
187-
188-
CMAKE_ARGS="-DLLAMA_CUDA=on" python3.11 -m pip install . -c constraints-dev.txt
189-
190-
# https://github.com/instructlab/instructlab/issues/1821
191-
# install with Torch and build dependencies installed
192-
python3.11 -m pip install packaging wheel setuptools-scm
193-
python3.11 -m pip install .[cuda] -r requirements-vllm-cuda.txt
180+
./scripts/install-ilab-with-cuda.sh
194181
195182
- name: Update instructlab-training library
196183
working-directory: ./training
197184
run: |
198185
. ../instructlab/venv/bin/activate
199-
pip install .
200-
pip install .[cuda]
186+
pip_install="pip install -c constraints-dev.txt"
187+
$pip_install .
188+
$pip_install .[cuda]
201189
202190
- name: Check disk before tests
203191
if: always()
@@ -380,7 +368,7 @@ jobs:
380368
working-directory: ./training
381369
run: |
382370
python -m pip install --upgrade pip
383-
pip install -r requirements-dev.txt
371+
pip install -r requirements-dev.txt -c constraints-dev.txt
384372
385373
- name: Try to upload Phase 1 to s3
386374
id: phase-1-upload-s3

.github/workflows/lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ jobs:
8080
- name: Install tox
8181
run: |
8282
python -m pip install --upgrade pip
83-
python -m pip install tox tox-gh
83+
python -m pip install tox tox-gh -c constraints-dev.txt
8484
8585
- name: "${{ matrix.lint.name }}"
8686
run: |

.github/workflows/unit.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ jobs:
7272
run: |
7373
python -m venv --upgrade-deps venv
7474
. venv/bin/activate
75-
pip install tox
75+
pip install tox -c constraints-dev.txt
7676
7777
- name: "Show disk utilization BEFORE tests"
7878
if: always()

constraints-dev.txt.in

Whitespace-only changes.

requirements-cuda.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ flash-attn>=2.4.0
22
bitsandbytes>=0.43.1
33

44
# required for FSDP updates
5-
accelerate>=0.34.2,<1.1.0
5+
accelerate>=0.34.2
66

77
# first version that includes Granite kernels
88
liger-kernel>=0.5.4

requirements-deepspeed.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# SPDX-License-Identifier: Apache-2.0
22

3-
deepspeed>=0.14.3
3+
deepspeed>=0.14.3

requirements-dev.txt

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,15 @@
22

33
-r requirements.txt
44

5+
isort
56
matplotlib
67
numpy
7-
pre-commit>=3.0.4,<5.0
8-
pylint>=2.16.2,<4.0
8+
pre-commit>=3.0.4
9+
pylint>=2.16.2
910
pylint-pydantic
10-
tox>=4.4.2,<5
11+
ruff
12+
tox>=4.4.2
13+
tox-current-env
1114

1215
ipython
1316
ipykernel

requirements.txt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,7 @@ transformers>=4.45.2
99

1010
datasets>=2.15.0
1111
numba
12-
# Note: numpy ranges copied from instructlab/instructlab
13-
#
14-
numpy>=1.26.4,<2.0.0
12+
numpy>=1.26.4
1513
rich
1614
instructlab-dolomite>=0.2.0
1715
trl>=0.9.4

0 commit comments

Comments
 (0)