Skip to content

Commit 0bdf38c

Browse files
authored
ci: Address cve and update packages (#1066)
* Address cve and update packages Signed-off-by: Dong Hyuk Chang <donghyukc@nvidia.com> * Attempt transformers pin to 4.55 Signed-off-by: Dong Hyuk Chang <donghyukc@nvidia.com> * Move security dep to appropriate group Signed-off-by: Dong Hyuk Chang <donghyukc@nvidia.com> * Update vllm and transformers Signed-off-by: Dong Hyuk Chang <donghyukc@nvidia.com> * Downgrade transformers Signed-off-by: Dong Hyuk Chang <donghyukc@nvidia.com> * Break up CPU testing into multiple tests based on folder Signed-off-by: Dong Hyuk Chang <donghyukc@nvidia.com> * Fix typo Signed-off-by: Dong Hyuk Chang <donghyukc@nvidia.com> * Update pytest folder path Signed-off-by: Dong Hyuk Chang <donghyukc@nvidia.com> * Move security vuln to constraints Signed-off-by: Dong Hyuk Chang <donghyukc@nvidia.com> --------- Signed-off-by: Dong Hyuk Chang <donghyukc@nvidia.com>
1 parent 8993985 commit 0bdf38c

File tree

3 files changed

+427
-949
lines changed

3 files changed

+427
-949
lines changed

.github/workflows/cicd-main.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -124,9 +124,10 @@ jobs:
124124
matrix:
125125
os: [ubuntu-latest]
126126
python-version: ["3.10", "3.12"]
127+
folder: ["backends", "core", "models", "pipelines", "stages", "tasks", "utils"]
127128
needs: [pre-flight, cicd-wait-in-queue]
128129
runs-on: ${{ matrix.os }}
129-
name: L0_Unit_Test_CPU_python-${{ matrix.python-version }}
130+
name: Unit_Test_${{ matrix.folder}}_CPU_python-${{ matrix.python-version }}
130131
environment: nemo-ci
131132
if: |
132133
(
@@ -149,18 +150,18 @@ jobs:
149150
uses: astral-sh/setup-uv@v6
150151
with:
151152
python-version: ${{ matrix.python-version }}
152-
- name: Run tests (CPU)
153+
- name: Run tests ${{ matrix.folder }} (CPU)
153154
run: |
154155
uv sync --link-mode copy --locked --extra audio_cpu --extra text_cpu --extra video_cpu --group test
155-
uv run coverage run --branch --source=nemo_curator -m pytest -v tests -m "not gpu"
156+
uv run coverage run --branch --source=nemo_curator -m pytest -v tests/${{ matrix.folder }} -m "not gpu"
156157
157158
- name: Generate report
158159
id: check
159160
shell: bash
160161
run: |
161162
uv run coverage xml
162163
uv run coverage report
163-
coverage_report=coverage-unit-test-${{ github.run_id }}-$(uuidgen)
164+
coverage_report=coverage-unit-test-${{ matrix.folder }}-${{ github.run_id }}-$(uuidgen)
164165
echo "$coverage_report"
165166
echo "coverage_report=$coverage_report" >> "$GITHUB_OUTPUT"
166167
- name: Upload artifacts

pyproject.toml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ dependencies = [
5252
"pyarrow",
5353
"ray[default,data]>=2.49",
5454
"torch",
55-
"transformers==4.53.1",
55+
"transformers==4.55.2",
5656
]
5757

5858
[project.optional-dependencies]
@@ -136,7 +136,7 @@ internvideo2 = [
136136
"torchaudio>=2.4.1",
137137
"torchvision>=0.19.1",
138138
"tqdm>=4.66.5",
139-
"transformers==4.53.1",
139+
"transformers==4.55.2",
140140
"wandb>=0.18.3",
141141
]
142142

@@ -158,7 +158,7 @@ video_cuda12 = [
158158
"PyNvVideoCodec==2.0.2; (platform_machine == 'x86_64' and platform_system != 'Darwin')",
159159
"torch<=2.8.0",
160160
"torchaudio",
161-
"vllm==0.9.2; (platform_machine == 'x86_64' and platform_system != 'Darwin')",
161+
"vllm==0.10.2; (platform_machine == 'x86_64' and platform_system != 'Darwin')",
162162
]
163163

164164
# All dependencies
@@ -181,12 +181,16 @@ test = [
181181
"pytest-loguru",
182182
"scikit-learn",
183183
]
184-
dev = ["internvideo2-multi-modality; (platform_machine == 'x86_64' and sys_platform != 'darwin')"]
185184

186185
[tool.uv]
187186
package = true
188187
default-groups = ["test"]
188+
index-strategy = "unsafe-best-match"
189189
no-build-isolation-package = ["flash-attn"]
190+
constraint-dependencies = [
191+
"protobuf>=4.25.8", # Address CVE GHSA-8qvm-5x2c-j2w7
192+
"xgrammar>=0.1.21", # Address CVE GHSA-5cmr-4px5-23pc
193+
]
190194
override-dependencies = [
191195
"apex; sys_platform == 'never'"
192196
]
@@ -207,7 +211,6 @@ url = "https://download.pytorch.org/whl/cu128"
207211
explicit = true
208212

209213
[tool.uv.sources]
210-
internvideo2-multi-modality = { git = "git+https://github.com/suiyoubi/InternVideo.git", subdirectory="InternVideo2/multi_modality", rev = "curator" }
211214
torch = [
212215
{ index = "pytorch", marker = "platform_machine == 'x86_64' and sys_platform != 'darwin'" },
213216
{ index = "pypi", marker = "platform_machine != 'x86_64' or sys_platform == 'darwin'" },

0 commit comments

Comments
 (0)