Skip to content
This repository was archived by the owner on Apr 30, 2026. It is now read-only.

Commit efaf2f6

Browse files
authored
Merge pull request #638 from instructlab/constraints-dev
2 parents d15ea24 + 8708a86 commit efaf2f6

12 files changed

Lines changed: 292 additions & 40 deletions
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
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: Checkout "update-constraints" in-house CI action
20+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
21+
with:
22+
repository: instructlab/ci-actions
23+
path: ci-actions
24+
ref: v0.2.0
25+
sparse-checkout: |
26+
actions/update-constraints
27+
28+
- name: Update constraints
29+
id: update-constraints
30+
uses: ./ci-actions/actions/update-constraints
31+
with:
32+
gh-token: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }}

.github/workflows/e2e-nvidia-l4-x1.yml

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ jobs:
105105
path: "instructlab"
106106
# https://github.com/actions/checkout/issues/249
107107
fetch-depth: 0
108-
108+
109109
- name: Checkout instructlab/sdg
110110
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
111111
with:
@@ -125,26 +125,27 @@ jobs:
125125
- name: Install ilab
126126
working-directory: ./instructlab
127127
run: |
128-
export CUDA_HOME="/usr/local/cuda"
129-
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/local/cuda/lib64:/usr/local/cuda/extras/CUPTI/lib64"
130-
export PATH="$PATH:$CUDA_HOME/bin"
131-
python3.11 -m venv --upgrade-deps venv
132-
. venv/bin/activate
133-
nvidia-smi
134-
python3.11 -m pip cache remove llama_cpp_python
128+
PYTHON=python3.11 ./scripts/install-ilab-with-cuda.sh
135129
136-
CMAKE_ARGS="-DGGML_CUDA=on" python3.11 -m pip install -v . -c constraints-dev.txt
137-
138-
# https://github.com/instructlab/instructlab/issues/1821
139-
# install with Torch and build dependencies installed
140-
python3.11 -m pip install -v packaging wheel setuptools-scm
141-
python3.11 -m pip install -v .[cuda] -r requirements-vllm-cuda.txt -c constraints-dev.txt
142-
143130
- name: Update instructlab-sdg library
144131
working-directory: ./sdg
145132
run: |
146133
. ../instructlab/venv/bin/activate
147-
pip install -v .
134+
# Patch out our own pin from the ilab repo constraints file
135+
ilab_constraints=../instructlab/constraints-dev.txt
136+
sed -i '/instructlab-sdg==/d' $ilab_constraints
137+
# Since we reuse the virtual environment prepared using ilab
138+
# constraints, we should stick to the same constraints when
139+
# installing latest sdg.
140+
#
141+
# FIX: this is not ideal; a proper fix would require decoupling the
142+
# two repos in CI: either by removing the job completely and relying
143+
# on "sdk" (no ilab) test runs; or by preparing a separate
144+
# constraints file that would consider both the requirements files
145+
# for the sdg library AND for the ilab - so that they are
146+
# consistent.
147+
pip_install="pip install -c $ilab_constraints"
148+
$pip_install .
148149
149150
- name: Check disk before tests
150151
run: |

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

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ jobs:
101101
path: "instructlab"
102102
# https://github.com/actions/checkout/issues/249
103103
fetch-depth: 0
104-
104+
105105
- name: Checkout instructlab/sdg
106106
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
107107
with:
@@ -180,8 +180,21 @@ jobs:
180180
working-directory: ./sdg
181181
run: |
182182
. ../instructlab/venv/bin/activate
183-
pip install .
184-
pip install .[cuda]
183+
# Patch out our own pin from the ilab repo constraints file
184+
ilab_constraints=../instructlab/constraints-dev.txt
185+
sed -i '/instructlab-sdg==/d' $ilab_constraints
186+
# Since we reuse the virtual environment prepared using ilab
187+
# constraints, we should stick to the same constraints when
188+
# installing latest sdg.
189+
#
190+
# FIX: this is not ideal; a proper fix would require decoupling the
191+
# two repos in CI: either by removing the job completely and relying
192+
# on "sdk" (no ilab) test runs; or by preparing a separate
193+
# constraints file that would consider both the requirements files
194+
# for the sdg library AND for the ilab - so that they are
195+
# consistent.
196+
pip_install="pip install -c $ilab_constraints"
197+
$pip_install .
185198
186199
- name: Check disk before tests
187200
run: |

.github/workflows/e2e-nvidia-t4-x1.yml

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -112,24 +112,27 @@ jobs:
112112
- name: Install ilab
113113
working-directory: ./instructlab
114114
run: |
115-
export PATH="/home/ec2-user/.local/bin:/usr/local/cuda/bin:$PATH"
116-
python3.11 -m venv --upgrade-deps venv
117-
. venv/bin/activate
118-
nvidia-smi
119-
python3.11 -m pip cache remove llama_cpp_python
120-
121-
CMAKE_ARGS="-DGGML_CUDA=on" python3.11 -m pip install -v . -c constraints-dev.txt
115+
PYTHON=python3.11 ./scripts/install-ilab-with-cuda.sh
122116
123-
# https://github.com/instructlab/instructlab/issues/1821
124-
# install with Torch and build dependencies installed
125-
python3.11 -m pip install -v packaging wheel setuptools-scm
126-
python3.11 -m pip install -v .[cuda]
127-
128117
- name: Update instructlab-sdg library
129118
working-directory: ./sdg
130119
run: |
131120
. ../instructlab/venv/bin/activate
132-
pip install .
121+
# Patch out our own pin from the ilab repo constraints file
122+
ilab_constraints=../instructlab/constraints-dev.txt
123+
sed -i '/instructlab-sdg==/d' $ilab_constraints
124+
# Since we reuse the virtual environment prepared using ilab
125+
# constraints, we should stick to the same constraints when
126+
# installing latest sdg.
127+
#
128+
# FIX: this is not ideal; a proper fix would require decoupling the
129+
# two repos in CI: either by removing the job completely and relying
130+
# on "sdk" (no ilab) test runs; or by preparing a separate
131+
# constraints file that would consider both the requirements files
132+
# for the sdg library AND for the ilab - so that they are
133+
# consistent.
134+
pip_install="pip install -c $ilab_constraints"
135+
$pip_install .
133136
134137
- name: Check disk before tests
135138
run: |

.github/workflows/functional-gpu-nvidia-t4-x1.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ on:
1818
- "**.py"
1919
- "pyproject.toml"
2020
- "requirements**.txt"
21-
- 'tox.ini'
21+
- "constraints-dev.txt"
22+
- "tox.ini"
2223
- ".github/workflows/functional-gpu-nvidia-t4-x1.yml" # This workflow
2324

2425
concurrency:
@@ -103,10 +104,10 @@ jobs:
103104
python3.11 -m venv --upgrade-deps venv
104105
. venv/bin/activate
105106
nvidia-smi
106-
python3.11 -m pip install tox tox-gh>=1.2
107+
python3.11 -m pip install tox tox-gh>=1.2 -c constraints-dev.txt
107108
python3.11 -m pip cache remove llama_cpp_python
108109
109-
CMAKE_ARGS="-DLLAMA_CUDA=on" python3.11 -m pip install -r requirements-dev.txt
110+
CMAKE_ARGS="-DLLAMA_CUDA=on" python3.11 -m pip install -r requirements-dev.txt -c constraints-dev.txt
110111
111112
- name: Check disk before tests
112113
run: |

.github/workflows/lint.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ on:
1111
- '**.py'
1212
- 'pyproject.toml'
1313
- 'requirements*.txt'
14+
- 'constraints-dev.txt'
1415
- 'tox.ini'
1516
- '.pylintrc'
1617
- 'scripts/*.sh'
@@ -24,6 +25,7 @@ on:
2425
- '**.py'
2526
- 'pyproject.toml'
2627
- 'requirements*.txt'
28+
- 'constraints-dev.txt'
2729
- 'tox.ini'
2830
- '.pylintrc'
2931
- 'scripts/*.sh'
@@ -71,7 +73,7 @@ jobs:
7173
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
7274
with:
7375
# https://github.com/actions/checkout/issues/249
74-
fetch-depth: 0
76+
fetch-depth: 0
7577

7678
- name: Setup Python 3.11
7779
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
@@ -85,7 +87,7 @@ jobs:
8587
- name: "Install tox"
8688
run: |
8789
python -m pip install --upgrade pip
88-
python -m pip install tox tox-gh
90+
python -m pip install tox tox-gh -c constraints-dev.txt
8991
9092
- name: "${{ matrix.lint.name }}"
9193
run: |

.github/workflows/test.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ on:
1212
- '**.py'
1313
- 'pyproject.toml'
1414
- 'requirements*.txt'
15+
- 'constraints-dev.txt'
1516
- 'tox.ini'
1617
- '.github/workflows/test.yml' # This workflow
1718
pull_request:
@@ -22,6 +23,7 @@ on:
2223
- '**.py'
2324
- 'pyproject.toml'
2425
- 'requirements*.txt'
26+
- 'constraints-dev.txt'
2527
- 'tox.ini'
2628
- '.github/workflows/test.yml' # This workflow
2729

@@ -101,7 +103,7 @@ jobs:
101103
- name: Install dependencies
102104
run: |
103105
python -m pip install --upgrade pip
104-
python -m pip install tox tox-gh>=1.2
106+
python -m pip install tox tox-gh>=1.2 -c constraints-dev.txt
105107
106108
- name: Run unit and functional tests with tox
107109
run: |

.gitignore

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,4 +169,10 @@ cython_debug/
169169
.vscode/
170170

171171
# SDG examples output
172-
docs/examples/**/output
172+
docs/examples/**/output
173+
174+
# Mac stuff
175+
**/.DS_Store
176+
177+
# pyenv version
178+
.python-version

0 commit comments

Comments
 (0)