Skip to content

Commit 7f0a6e7

Browse files
committed
NO-JIRA: update dependencies in pyproject.toml (JupyterLab, Elyra, trustyai, TensorFlow, PyTorch, and others) and refine group configurations
1 parent 1b678bd commit 7f0a6e7

File tree

2 files changed

+212
-96
lines changed

2 files changed

+212
-96
lines changed

pyproject.toml

Lines changed: 55 additions & 96 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,12 @@ name = "notebooks"
44
version = "2025.1"
55
description = "Open Data Hub / OpenShift AI Notebook / Workbench images, and tests for the same in Python."
66
readme = "README.md"
7-
package-mode = false
87
requires-python = ">=3.11,<3.13"
98

9+
# WARNING: Do NOT attempt `uv lock --universal` (the default) resolution on this pyproject.toml.
10+
# It would work (had the ` conflics ` section were defined), but it would run 10+ minutes and produce a huge `uv.lock` file (60MiB+).
11+
# Instead, use the `scripts/sync-requirements-txt.sh` script which runs in seconds.
12+
1013
[dependency-groups]
1114

1215
############################
@@ -35,26 +38,24 @@ dev = [
3538
]
3639

3740
base = [
38-
3941
"wheel~=0.45.1",
40-
"setuptools~=78.1.1; python_version == '3.11'",
41-
"setuptools~=75.8.2; python_version == '3.12'",
42+
"setuptools~=78.1.1",
4243
]
4344

4445
jupyter-base = [
45-
"jupyterlab==4.2.7",
46-
"jupyter-server~=2.15.0",
46+
"jupyterlab==4.4.4",
47+
"jupyter-server~=2.16.0",
4748
"jupyter-server-proxy~=4.4.0",
4849
"jupyter-server-terminals~=0.5.3",
49-
"jupyterlab-git~=0.50.1",
50+
"jupyterlab-git~=0.51.1",
5051
"nbdime~=4.0.2",
5152
"nbgitpuller~=1.2.2",
5253
]
5354

5455
elyra-base = [
55-
"odh-elyra==4.2.0",
56-
"jupyterlab-lsp~=5.1.0",
57-
"jupyterlab-widgets~=3.0.13",
56+
"odh-elyra==4.2.3",
57+
"jupyterlab-lsp~=5.1.1",
58+
"jupyterlab-widgets~=3.0.15",
5859
"jupyter-resource-usage~=1.1.1",
5960
]
6061

@@ -63,15 +64,14 @@ elyra-preferred = [
6364
]
6465

6566
elyra-trustyai = [
66-
"jupyter-bokeh~=3.0.5",
67+
"jupyter-bokeh~=3.0.5", # trustyai 0.6.1 depends on jupyter-bokeh~=3.0.5
6768
]
6869

6970
db-connectors = [
7071
"pymongo~=4.11.2",
7172
"psycopg~=3.2.5",
7273
"pyodbc~=5.2.0",
73-
"mysql-connector-python~=9.3.0; python_version == '3.11'",
74-
"mysql-connector-python~=9.2.0; python_version == '3.12'",
74+
"mysql-connector-python~=9.3.0",
7575
]
7676

7777
# onnxconverter-common ~=1.13.0 required for skl2onnx, as upgraded version is not compatible with protobuf
@@ -87,8 +87,7 @@ datascience-base = [
8787
]
8888

8989
codeflare = [
90-
"codeflare-sdk~=0.29.0; python_version == '3.11'",
91-
"codeflare-sdk~=0.28.1; python_version == '3.12'",
90+
"codeflare-sdk~=0.30.0",
9291
]
9392

9493
datascience-preferred = [
@@ -109,7 +108,7 @@ datascience-trustyai = [
109108
"matplotlib~=3.6.3",
110109
"numpy~=1.24.1",
111110
"pandas~=1.5.3",
112-
"scikit-learn~=1.2.1"
111+
"scikit-learn~=1.7.0"
113112
]
114113

115114
tensorflowcuda= [
@@ -118,8 +117,8 @@ tensorflowcuda= [
118117
"tf2onnx~=1.16.1",
119118
]
120119
tensorflowrocm = [
121-
"tensorflow-rocm~=2.14.0.600",
122-
"tensorboard~=2.14.0",
120+
"tensorflow-rocm~=2.18.1",
121+
"tensorboard~=2.18.0",
123122
"tf2onnx~=1.16.1",
124123
]
125124
pytorchcuda = [
@@ -135,7 +134,7 @@ pytorchrocm = [
135134
]
136135
llmcompressor = [
137136
"vllm~=0.8.5",
138-
"llmcompressor~=0.5.1; python_version == '3.11'",
137+
"llmcompressor~=0.6.0",
139138
"lm-eval~=0.4.8",
140139
"loguru",
141140
"pyyaml>=5.0.0",
@@ -150,7 +149,8 @@ llmcompressor = [
150149
]
151150
trustyai = [
152151
"torch==2.6.0",
153-
"transformers~=4.49.0",
152+
"transformers~=4.53.0; python_version == '3.11'",
153+
"transformers~=4.55.0; python_version == '3.12'",
154154
"datasets~=3.4.1",
155155
"accelerate~=1.5.2",
156156
"trustyai~=0.6.1",
@@ -160,14 +160,14 @@ trustyai = [
160160
# Workbench Image Groups #
161161
#########################
162162

163+
# https://docs.astral.sh/uv/concepts/projects/workspaces/#when-not-to-use-workspaces
164+
163165
jupyter-minimal-image = [
164-
{ include-group = "dev" },
165166
{ include-group = "base" },
166167
{ include-group = "jupyter-base" },
167168
]
168169

169170
jupyter-datascience-image = [
170-
{ include-group = "dev" },
171171
{ include-group = "base" },
172172
{ include-group = "jupyter-base" },
173173
{ include-group = "elyra-base" },
@@ -179,7 +179,6 @@ jupyter-datascience-image = [
179179
]
180180

181181
jupyter-tensorflow-image = [
182-
{ include-group = "dev" },
183182
{ include-group = "base" },
184183
{ include-group = "jupyter-base" },
185184
{ include-group = "elyra-base" },
@@ -192,7 +191,6 @@ jupyter-tensorflow-image = [
192191
]
193192

194193
jupyter-tensorflow-rocm-image = [
195-
{ include-group = "dev" },
196194
{ include-group = "base" },
197195
{ include-group = "jupyter-base" },
198196
{ include-group = "elyra-base" },
@@ -205,7 +203,6 @@ jupyter-tensorflow-rocm-image = [
205203
]
206204

207205
jupyter-pytorch-image = [
208-
{ include-group = "dev" },
209206
{ include-group = "base" },
210207
{ include-group = "jupyter-base" },
211208
{ include-group = "elyra-base" },
@@ -218,7 +215,6 @@ jupyter-pytorch-image = [
218215
]
219216

220217
jupyter-pytorch-rocm-image = [
221-
{ include-group = "dev" },
222218
{ include-group = "base" },
223219
{ include-group = "jupyter-base" },
224220
{ include-group = "elyra-base" },
@@ -231,7 +227,6 @@ jupyter-pytorch-rocm-image = [
231227
]
232228

233229
jupyter-pytorch-llmcompressor-image = [
234-
{ include-group = "dev" },
235230
{ include-group = "base" },
236231
{ include-group = "jupyter-base" },
237232
{ include-group = "elyra-base" },
@@ -240,10 +235,10 @@ jupyter-pytorch-llmcompressor-image = [
240235
{ include-group = "datascience-tensorflow" },
241236
{ include-group = "db-connectors" },
242237
{ include-group = "llmcompressor" },
238+
{ include-group = "pytorchcuda" },
243239
]
244240

245241
jupyter-trustyai-image = [
246-
{ include-group = "dev" },
247242
{ include-group = "base" },
248243
{ include-group = "jupyter-base" },
249244
{ include-group = "elyra-base" },
@@ -253,23 +248,40 @@ jupyter-trustyai-image = [
253248
{ include-group = "codeflare" },
254249
{ include-group = "db-connectors" },
255250
{ include-group = "trustyai" },
251+
{ include-group = "pytorchcuda" },
256252
]
257253

254+
# https://docs.astral.sh/uv/concepts/projects/dependencies/#dependency-sources
258255
[tool.uv.sources]
256+
257+
# NOTE: it is important to specify the `index` for the top-level groups, the ones used in the final resolution.
258+
# Index values do not inherit from a lower-level group to the one where it is included.
259+
260+
# https://docs.astral.sh/uv/guides/integration/pytorch/#using-uv-with-pytorch
259261
torch = [
260-
{ index = "pytorch-cuda", group = "pytorchcuda" },
261-
{ index = "pytorch-cuda", group = "trustyai" },
262-
{ index = "pytorch-rocm", group = "pytorchrocm" },
262+
{ index = "pytorch-cuda", group = "jupyter-pytorch-image" },
263+
{ index = "pytorch-cuda", group = "jupyter-pytorch-llmcompressor-image" },
264+
{ index = "pytorch-cuda", group = "jupyter-trustyai-image" },
265+
266+
{ index = "pytorch-rocm", group = "jupyter-pytorch-rocm-image" },
263267
]
264268
torchvision = [
265-
{ index = "pytorch-cuda", group = "pytorchcuda" },
266-
{ index = "pytorch-rocm", group = "pytorchrocm" },
269+
{ index = "pytorch-cuda", group = "jupyter-pytorch-image" },
270+
{ index = "pytorch-cuda", group = "jupyter-pytorch-llmcompressor-image" },
271+
{ index = "pytorch-cuda", group = "jupyter-trustyai-image" },
272+
273+
{ index = "pytorch-rocm", group = "jupyter-pytorch-rocm-image" },
267274
]
268275
pytorch-triton-rocm = [
269-
{ index = "pytorch-rocm" },
276+
{ index = "pytorch-rocm", group = "jupyter-pytorch-rocm-image" },
277+
]
278+
tensorflow-rocm = [
279+
{ url = "https://repo.radeon.com/rocm/manylinux/rocm-rel-6.4/tensorflow_rocm-2.18.1-cp312-cp312-manylinux_2_28_x86_64.whl", group = "jupyter-tensorflow-rocm-image" },
270280
]
271281

272-
282+
# https://docs.astral.sh/uv/concepts/indexes/#package-indexes
283+
# TODO(jdanek): explicit = false, otherwise `uv pip compile --emit-index-url` wont emit it
284+
# also see https://github.com/astral-sh/uv/issues/10008, https://github.com/astral-sh/uv/issues/15534
273285
[[tool.uv.index]]
274286
name = "pytorch-cuda"
275287
url = "https://download.pytorch.org/whl/cu126"
@@ -283,7 +295,7 @@ explicit = true
283295
[[tool.uv.index]]
284296
name = "pypi"
285297
url = "https://pypi.org/simple/"
286-
explicit = true
298+
explicit = true
287299

288300
[[tool.uv.dependency-metadata]]
289301
name = "tf2onnx"
@@ -297,68 +309,15 @@ requires-dist = ["compressed-tensors"]
297309

298310
[[tool.uv.dependency-metadata]]
299311
name = "tensorflow-rocm"
300-
version = "2.14.0.600"
301-
requires-dist = [
302-
"tensorflow-cpu-aws; platform_machine != 'x86_64'",
303-
"tensorflow-estimator",
304-
"tensorflow-io-gcs-filesystem",
305-
]
312+
version = "2.18.1"
313+
requires-dist = []
306314

307315
[tool.uv]
308316
package = false
309-
required-environments = [
310-
"sys_platform == 'linux'"
311-
]
312-
313-
conflicts = [
314-
[
315-
{ group = "elyra-preferred" },
316-
{ group = "elyra-trustyai" }
317-
],
318-
[
319-
{ group = "elyra-preferred" },
320-
{ group = "trustyai" }
321-
],
322-
[
323-
{ group = "datascience-preferred" },
324-
{ group = "trustyai" },
325-
{ group = "tensorflowcuda" },
326-
{ group = "llmcompressor" },
327-
],
328-
[
329-
{ group = "datascience-tensorflow" },
330-
{ group = "trustyai" }
331-
],
332-
[
333-
{ group = "datascience-preferred" },
334-
{ group = "datascience-trustyai" },
335-
{ group = "datascience-tensorflow" },
336-
],
337-
[
338-
{ group = "tensorflowcuda" },
339-
{ group = "tensorflowrocm" },
340-
{ group = "pytorchcuda" },
341-
{ group = "pytorchrocm" },
342-
{ group = "trustyai" },
343-
],
344-
[
345-
{ group = "tensorflowcuda" },
346-
{ group = "tensorflowrocm" },
347-
{ group = "datascience-base" },
348-
],
349-
[
350-
{ group = "tensorflowcuda" },
351-
{ group = "trustyai" },
352-
{ group = "datascience-trustyai" },
353-
],
354-
[
355-
{group = "llmcompressor"},
356-
{group = "trustyai"},
357-
],
358-
[
359-
{ group = "llmcompressor" },
360-
{ group = "codeflare" },
361-
]
317+
318+
# https://docs.astral.sh/uv/concepts/resolution/#platform-specific-resolution
319+
environments = [
320+
"sys_platform == 'linux' and implementation_name == 'cpython'",
362321
]
363322

364323
# https://github.com/astral-sh/uv/issues/3957#issuecomment-2659350181
@@ -477,4 +436,4 @@ indent-style = "space"
477436
skip-magic-trailing-comma = false
478437

479438
docstring-code-format = true
480-
docstring-code-line-length = "dynamic"
439+
docstring-code-line-length = "dynamic"

0 commit comments

Comments
 (0)