Skip to content

Commit 9c7ced8

Browse files
authored
Pin litellm to 1.83.14 and switch installs to uv (#1433)
Signed-off-by: gwarmstrong <gwarmstrong@users.noreply.github.com> Co-authored-by: gwarmstrong <gwarmstrong@users.noreply.github.com>
1 parent 589294c commit 9c7ced8

6 files changed

Lines changed: 36 additions & 10 deletions

File tree

.github/workflows/gpu_tests.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,12 @@ jobs:
4242
HF_TOKEN: ${{ secrets.HF_TOKEN }}
4343
run: |
4444
cd ${{ github.run_id }}
45-
python -m pip install --upgrade pip
46-
pip uninstall -y nemo-skills nemo_run
47-
pip install -e .
48-
pip install -r requirements/common-tests.txt
45+
python -m pip install --upgrade pip uv
46+
uv pip uninstall --system nemo-skills nemo_run || true
47+
# Use `uv pip` so [tool.uv].override-dependencies in pyproject.toml is honored
48+
# (relaxes leptonai's httpx==0.27.2 pin so litellm 1.83.x can be installed).
49+
uv pip install --system -e .
50+
uv pip install --system -r requirements/common-tests.txt
4951
ns prepare_data gsm8k human-eval mbpp algebra222 mmlu ifeval math-500 amc23 aime24
5052
- name: Build Docker image
5153
run: |

.github/workflows/lint.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,10 @@ jobs:
3131
cache: pip
3232
- name: Install dependencies
3333
run: |
34-
python -m pip install --upgrade pip
35-
pip install -e .[dev]
34+
python -m pip install --upgrade pip uv
35+
# Use `uv pip` so [tool.uv].override-dependencies in pyproject.toml is honored
36+
# (relaxes leptonai's httpx==0.27.2 pin so litellm 1.83.x can be installed).
37+
uv pip install --system -e .[dev]
3638
- name: List Checked Files
3739
run: git diff --name-only ${GITHUB_BASE_REF} HEAD
3840
- name: Run Pre-Commit Checks

.github/workflows/tests.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,10 @@ jobs:
4343
cache: pip
4444
- name: Install dependencies
4545
run: |
46-
python -m pip install --upgrade pip
47-
pip install -e .[dev] --extra-index-url https://download.pytorch.org/whl/cpu
46+
python -m pip install --upgrade pip uv
47+
# Use `uv pip` so [tool.uv].override-dependencies in pyproject.toml is honored
48+
# (relaxes leptonai's httpx==0.27.2 pin so litellm 1.83.x can be installed).
49+
uv pip install --system -e .[dev]
4850
# Clear pip cache
4951
pip cache purge || true
5052
- name: Build Images

core/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ iso639-lang
2222
langcodes
2323
langdetect
2424
language-data
25-
litellm[caching]==1.83.0
25+
litellm[caching]==1.83.14
2626
math-verify[antlr4_9_3]
2727
mcp
2828
numpy

dockerfiles/Dockerfile.nemo-skills

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,10 @@ COPY core/requirements.txt /opt/NeMo-Skills/core/requirements.txt
6262
# installing sdp in container only
6363
RUN pip install git+https://github.com/NVIDIA/NeMo-speech-data-processor@29b9b1ec0ceaf3ffa441c1d01297371b3f8e11d2
6464
ARG CACHEBUST=4
65-
RUN pip install --no-cache-dir -r /opt/NeMo-Skills/core/requirements.txt -r /opt/NeMo-Skills/requirements/pipeline.txt
65+
# Install via `uv pip` from the project directory so [tool.uv].override-dependencies
66+
# in pyproject.toml (which relaxes leptonai's httpx==0.27.2 pin so litellm 1.83.x
67+
# can be installed) is picked up. Plain pip ignores [tool.uv] and the resolver fails.
68+
RUN cd /opt/NeMo-Skills && uv pip install --system --no-cache-dir \
69+
-r core/requirements.txt -r requirements/pipeline.txt
6670
# Fix http mismatch between lepton and dggs by manually downloading dggs here
6771
RUN pip install ddgs

pyproject.toml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,22 @@ pipeline = { file = ["requirements/pipeline.txt"] }
6666
# Dev: development and testing tools
6767
dev = { file = ["requirements/common-tests.txt", "requirements/common-dev.txt"] }
6868

69+
[tool.uv]
70+
# Force resolver-wide overrides to break dependency conflicts that come from
71+
# transitive pins we can't easily change upstream. These are honored by `uv`
72+
# (uv pip / uv sync) but ignored by plain pip — Dockerfiles using plain pip
73+
# rely on pip's looser resolver instead.
74+
override-dependencies = [
75+
# leptonai (pulled in by nemo_run) hard-pins httpx[http2]==0.27.2, which
76+
# conflicts with litellm==1.83.14's httpx==0.28.1. Relax the pin so the
77+
# resolver can pick a single version that satisfies litellm.
78+
"httpx[http2]>=0.28.1",
79+
# urllib3<2 has open CVEs (e.g. CVE-2024-37891 / CVE-2025-50182). torchx
80+
# 0.7.0 (a transitive dep of nemo_run) pins urllib3<1.27, but in practice
81+
# urllib3>=2 works at runtime, so override the constraint.
82+
"urllib3>=2.6.3",
83+
]
84+
6985
[tool.pytest.ini_options]
7086
markers = [
7187
"gpu: tests that require a GPU to run",

0 commit comments

Comments
 (0)