Skip to content

Commit bc48185

Browse files
authored
chore: move python pin to <=3.14 (#664)
<!-- SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. --> <!-- SPDX-License-Identifier: Apache-2.0 --> <!-- Thank you for contributing to Safe Synthesizer! --> # Summary <!-- Brief description of changes --> ## Pre-Review Checklist <!-- These checks should be completed before a PR is reviewed, --> <!-- but you can submit a draft early to indicate that the issue is being worked on. --> Ensure that the following pass: - [ ] `mise run format && mise run check` or via prek validation. - [ ] `mise run test` passes locally - [ ] `mise run test:e2e` passes locally - [ ] `mise run test:ci-container` passes locally (recommended) - [ ] GPU CI status check passes -- comment `/sync` on this PR to trigger a run (auto-triggers on ready-for-review) ## Pre-Merge Checklist <!-- These checks need to be completed before a PR is merged, --> <!-- but as PRs often change significantly during review, --> <!-- it's OK for them to be incomplete when review is first requested. --> - [ ] New or updated tests for any fix or new behavior - [ ] Updated documentation for new features and behaviors, including docstrings for API docs. ## Other Notes <!-- Please add the issue number that should be closed when this PR is merged. --> - Closes #<issue> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added explicit support for Python 3.14 and extended the supported Python range to <3.15. * **Tests** * Extended the unit-test CI matrix to include Python 3.14. * **Documentation** * Refreshed CUDA 12.9 installation instructions and tutorials with updated wheel/extra index URLs (including FlashInfer and vLLM 0.26.0 endpoints). * Updated README and release verification steps to use the new index URLs. * **Chores** * Updated FlashInfer-related pins and install/index mappings, and bumped vLLM to 0.26.0 for both CPU and CUDA 12.9 options. * Added `openai>=2.25.0` to relevant optional dependency groups. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Signed-off-by: mkornfield <mkornfield@nvidia.com>
1 parent 5008564 commit bc48185

17 files changed

Lines changed: 1523 additions & 387 deletions

.github/workflows/ci-checks.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ jobs:
174174
strategy:
175175
fail-fast: false
176176
matrix:
177-
python-version: ["3.11", "3.12", "3.13"]
177+
python-version: ["3.11", "3.12", "3.13", "3.14"]
178178
steps:
179179
- name: checkout
180180
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1

AGENTS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Durable implementation guidance belongs with the code it describes: function and
1717

1818
See [STYLE_GUIDE.md](STYLE_GUIDE.md) for detailed code style conventions (Python, markdown, Dockerfiles, shell scripts, testing, config files, docstrings).
1919

20-
Use `uv` for everything -- never `pip` or raw `python`. Python 3.11–3.13 with modern syntax (`X | Y`, `list[str]`, `Self`). Python 3.14+ is not supported.
20+
Use `uv` for everything -- never `pip` or raw `python`. Python 3.11–3.14 with modern syntax (`X | Y`, `list[str]`, `Self`).
2121

2222
Common commands: `mise run test` (unit tests), `mise run format` (auto-fix formatting + lint + copyright), `mise run check` (read-only local quality checks), `mise run validate` (pre-PR quality, lock, and CI unit checks), `mise run typecheck` (ty only). Always use mise tasks or the wrapper scripts in `tools/` instead of running `ruff` or `ty` directly. Use `uv run` for Python execution. When in doubt, inspect `mise tasks` and `pytest --markers`.
2323

CONTRIBUTING.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Please read our [Code of Conduct](CODE_OF_CONDUCT.md) before contributing.
2727

2828
### Prerequisites
2929

30-
- Python 3.11–3.13 (project supports Python 3.11, 3.12, and 3.13; `.python-version` pins 3.13 for bootstrapping at the repo root. Python 3.14+ is not supported — see [Troubleshooting](docs/user-guide/troubleshooting.md#python-314-is-not-supported))
30+
- Python 3.11–3.14 (project supports Python 3.11, 3.12, 3.13, and 3.14; `.python-version` pins 3.13 for bootstrapping at the repo root)
3131
- Git 2.34+ (minimum required for SSH commit signing)
3232

3333
> Note: Other tools like [uv](https://docs.astral.sh/uv/), [dprint](https://dprint.dev/), [ruff](https://docs.astral.sh/ruff/), [ty](https://github.com/astral-sh/ty), and [gh](https://cli.github.com/) are installed automatically by `make setup` (via [mise](https://mise.jdx.dev/)). Tool versions are declared in `.mise.toml` and locked in `mise.lock` (committed), ensuring reproducible toolchains across developer systems and CI. These should not interfere with locally installed tools.
@@ -786,8 +786,9 @@ uv --no-config pip install \
786786
--python "${SMOKE_VENV}/bin/python" \
787787
--default-index https://pypi.org/simple \
788788
--index https://flashinfer.ai/whl/cu129 \
789+
--index https://flashinfer.ai/whl/ \
789790
--index https://download.pytorch.org/whl/cu129 \
790-
--index https://wheels.vllm.ai/ee0da84ab9e04ac7610e28580af62c365e898389/cu129 \
791+
--index https://wheels.vllm.ai/0.26.0/cu129 \
791792
--index-strategy unsafe-best-match \
792793
"nemo-safe-synthesizer[cu129,engine]==${NSS_VERSION}"
793794
uv --no-config pip check --python "${SMOKE_VENV}/bin/python"

README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Read detailed usage below, or jump to the documentation with [Getting Started](h
1818

1919
### Prerequisites
2020

21-
- Python 3.11–3.13 (`.python-version` pins 3.13 for local/dev bootstrap; any 3.11, 3.12, or 3.13 interpreter works. Python 3.14+ is NOT supported because vLLM currently declares `<3.14` support while upstream resolves Python 3.14 wheel compatibility across its dependency stack)
21+
- Python 3.11–3.14 (`.python-version` pins 3.13 for local/dev bootstrap; any 3.11, 3.12, 3.13, or 3.14 interpreter works)
2222
- [uv](https://docs.astral.sh/uv/) (recommended) or pip -- Python package manager
2323
- NVIDIA GPU (A100 or larger) for training and generation
2424
- Linux only -- macOS, Windows, and Apple Silicon are not supported for training or generation. A CPU-only install is available for development and configuration validation.
@@ -29,15 +29,17 @@ Read detailed usage below, or jump to the documentation with [Getting Started](h
2929
# With uv (recommended):
3030
uv pip install "nemo-safe-synthesizer[cu129,engine]" \
3131
--index https://flashinfer.ai/whl/cu129 \
32+
--index https://flashinfer.ai/whl/ \
3233
--index https://download.pytorch.org/whl/cu129 \
33-
--index https://wheels.vllm.ai/ee0da84ab9e04ac7610e28580af62c365e898389/cu129 \
34+
--index https://wheels.vllm.ai/0.26.0/cu129 \
3435
--index-strategy unsafe-best-match
3536

3637
# With pip:
3738
pip install "nemo-safe-synthesizer[cu129,engine]" \
3839
--extra-index-url https://download.pytorch.org/whl/cu129 \
3940
--extra-index-url https://flashinfer.ai/whl/cu129 \
40-
--extra-index-url https://wheels.vllm.ai/ee0da84ab9e04ac7610e28580af62c365e898389/cu129
41+
--extra-index-url https://flashinfer.ai/whl/ \
42+
--extra-index-url https://wheels.vllm.ai/0.26.0/cu129
4143
```
4244

4345
Or install from source:

STYLE_GUIDE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ How to write clear, testable Python -- independent of which library primitives y
116116

117117
### Type hints
118118

119-
The codebase targets Python 3.11–3.13 and uses native typing syntax throughout. Expect 3.11 as the minimum for the foreseeable future; the upper bound tracks dependency availability (currently vLLM declares `<3.14` support while its dependency stack gains full `cp314` wheel coverage).
119+
The codebase targets Python 3.11–3.14 and uses native typing syntax throughout. Expect 3.11 as the minimum for the foreseeable future; the upper bound tracks dependency availability (`requires-python` is currently `<3.15`).
120120

121121
Even though `.python-version` pins Python 3.13 for local development and CI defaults, shared package code must stay Python 3.11 syntax-compatible until the NMP platform moves its base Python version to 3.12. Do not use Python 3.12-only syntax yet, including PEP 695 `type` statements or bracketed generic class/function parameters. Prefer `TypeAlias`, `TypeVar`, and `typing_extensions` backports when newer typing features are useful before the minimum runtime moves.
122122

containers/Dockerfile.test_ci

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ RUN --mount=type=cache,target=/root/.cache/uv \
4040
--no-sources \
4141
--default-index https://pypi.org/simple \
4242
--index https://download.pytorch.org/whl/cpu \
43+
--index https://flashinfer.ai/whl/ \
4344
--index-strategy unsafe-best-match \
4445
"nemo-safe-synthesizer[cpu,engine] @ file://${wheel}" && \
4546
uv --no-config pip check --python /opt/wheel-cpu/bin/python && \
@@ -53,8 +54,9 @@ RUN --mount=type=cache,target=/root/.cache/uv \
5354
--dry-run \
5455
--default-index https://pypi.org/simple \
5556
--index https://flashinfer.ai/whl/cu129 \
57+
--index https://flashinfer.ai/whl/ \
5658
--index https://download.pytorch.org/whl/cu129 \
57-
--index https://wheels.vllm.ai/ee0da84ab9e04ac7610e28580af62c365e898389/cu129 \
59+
--index https://wheels.vllm.ai/0.26.0/cu129 \
5860
--index-strategy unsafe-best-match \
5961
"nemo-safe-synthesizer[cu129,engine] @ file://${wheel}" && \
6062
rm -rf /opt/wheel-cpu /opt/wheel-cu129

cuda_deps.toml

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,20 @@ base_runtime_deps = []
88
torch_runtime_deps = [
99
"accelerate>=1.1.0",
1010
"bitsandbytes>=0.46.1",
11-
"flashinfer-python==0.6.12; sys_platform == 'linux'",
12-
"flashinfer-cubin==0.6.12; sys_platform == 'linux'",
11+
"flashinfer-python==0.6.14; sys_platform == 'linux'",
12+
"flashinfer-cubin==0.6.14; sys_platform == 'linux'",
1313
"gliner",
1414
"kernels>=0.12.1,<0.15",
1515
"opacus",
1616
"peft>=0.18.0",
1717
"sentence-transformers",
18+
"openai>=2.25.0",
1819
"trl>=0.23.0",
1920
"xgrammar>=0.2.0; sys_platform == 'linux'",
2021
]
2122

2223
cuda_runtime_deps = [
23-
{ name = "flashinfer-jit-cache", version = "0.6.12", local = "{torch_local_version}", sys_platform = "linux", source_kind = "flashinfer" },
24+
{ name = "flashinfer-jit-cache", version = "0.6.14", local = "{torch_local_version}", sys_platform = "linux", source_kind = "flashinfer" },
2425
{ name = "nvidia-cublas-{cuda_package_suffix}", sys_platform = "linux" },
2526
"nvidia-ml-py; sys_platform == 'linux'",
2627
"torch-c-dlpack-ext",
@@ -64,7 +65,7 @@ dependencies = [
6465
"torchao==0.17.0",
6566
"transformers==5.12.0",
6667
"triton>=2.0.0; sys_platform=='linux'",
67-
"vllm==0.24.0; sys_platform=='linux'",
68+
"vllm==0.26.0; sys_platform=='linux'",
6869
]
6970

7071
[[indexes]]
@@ -83,8 +84,13 @@ url = "https://pypi.nvidia.com"
8384
explicit = true
8485

8586
[[indexes]]
86-
name = "vllm-v0-24-0-cu129"
87-
url = "https://wheels.vllm.ai/ee0da84ab9e04ac7610e28580af62c365e898389/cu129"
87+
name = "flashinfer-cubin"
88+
url = "https://flashinfer.ai/whl/"
89+
explicit = true
90+
91+
[[indexes]]
92+
name = "vllm-v0-26-0-cu129"
93+
url = "https://wheels.vllm.ai/0.26.0/cu129"
8894
explicit = true
8995

9096
[cuda_indexes.pytorch]
@@ -99,13 +105,21 @@ explicit = true
99105

100106
# Static source entries are grouped by the extra they activate. The generator
101107
# supplies that extra and rejects a conflicting explicit value.
108+
[sources.cpu]
109+
flashinfer-cubin = [
110+
{ index = "flashinfer-cubin", marker = "sys_platform == 'linux'" },
111+
]
112+
102113
[sources.cu129]
114+
flashinfer-cubin = [
115+
{ index = "flashinfer-cubin", marker = "sys_platform == 'linux'" },
116+
]
103117
vllm = [
104-
{ index = "vllm-v0-24-0-cu129", marker = "sys_platform == 'linux'", extra = "cu129" },
118+
{ index = "vllm-v0-26-0-cu129", marker = "sys_platform == 'linux'", extra = "cu129" },
105119
]
106120

107121
[variants.cu129]
108122
cuda_package_suffix = "cu12"
109123
dependencies = [
110-
"vllm==0.24.0+{torch_local_version}; sys_platform == 'linux'",
124+
"vllm==0.26.0+{torch_local_version}; sys_platform == 'linux'",
111125
]

docs/dev-notes/posts/introducing-nemo-safe-synthesizer.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,8 @@ Each score maps to concrete remediation guidance in the documentation. The [Prod
8787
pip install "nemo-safe-synthesizer[cu129,engine]" \
8888
--extra-index-url https://download.pytorch.org/whl/cu129 \
8989
--extra-index-url https://flashinfer.ai/whl/cu129 \
90-
--extra-index-url https://wheels.vllm.ai/ee0da84ab9e04ac7610e28580af62c365e898389/cu129
90+
--extra-index-url https://flashinfer.ai/whl/ \
91+
--extra-index-url https://wheels.vllm.ai/0.26.0/cu129
9192
```
9293

9394
The quickest way to run your first pipeline is the CLI:

docs/tutorials/differential-privacy.ipynb

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,19 @@
3939
"# SPDX-License-Identifier: Apache-2.0\n",
4040
"\n",
4141
"if command -v uv > /dev/null 2>&1; then\n",
42-
" uv pip install \"nemo-safe-synthesizer[engine,cu129]\" --index https://flashinfer.ai/whl/cu129 --index https://download.pytorch.org/whl/cu129 --index https://wheels.vllm.ai/ee0da84ab9e04ac7610e28580af62c365e898389/cu129 --index-strategy unsafe-best-match\n",
42+
" uv pip install \"nemo-safe-synthesizer[engine,cu129]\" \\\n",
43+
" --index https://flashinfer.ai/whl/cu129 \\\n",
44+
" --index https://flashinfer.ai/whl/ \\\n",
45+
" --index https://download.pytorch.org/whl/cu129 \\\n",
46+
" --index https://wheels.vllm.ai/0.26.0/cu129 \\\n",
47+
" --index-strategy unsafe-best-match\n",
4348
" uv pip install kagglehub\n",
4449
"else\n",
45-
" pip install \"nemo-safe-synthesizer[engine,cu129]\" --extra-index-url https://flashinfer.ai/whl/cu129 --extra-index-url https://download.pytorch.org/whl/cu129 --extra-index-url https://wheels.vllm.ai/ee0da84ab9e04ac7610e28580af62c365e898389/cu129\n",
50+
" pip install \"nemo-safe-synthesizer[engine,cu129]\" \\\n",
51+
" --extra-index-url https://flashinfer.ai/whl/cu129 \\\n",
52+
" --extra-index-url https://flashinfer.ai/whl/ \\\n",
53+
" --extra-index-url https://download.pytorch.org/whl/cu129 \\\n",
54+
" --extra-index-url https://wheels.vllm.ai/0.26.0/cu129\n",
4655
" pip install kagglehub\n",
4756
"fi\n"
4857
]

docs/tutorials/safe-synthesizer-101.ipynb

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,19 @@
4545
"# SPDX-License-Identifier: Apache-2.0\n",
4646
"\n",
4747
"if command -v uv > /dev/null 2>&1; then\n",
48-
" uv pip install \"nemo-safe-synthesizer[engine,cu129]\" --index https://flashinfer.ai/whl/cu129 --index https://download.pytorch.org/whl/cu129 --index https://wheels.vllm.ai/ee0da84ab9e04ac7610e28580af62c365e898389/cu129 --index-strategy unsafe-best-match\n",
48+
" uv pip install \"nemo-safe-synthesizer[engine,cu129]\" \\\n",
49+
" --index https://flashinfer.ai/whl/cu129 \\\n",
50+
" --index https://flashinfer.ai/whl/ \\\n",
51+
" --index https://download.pytorch.org/whl/cu129 \\\n",
52+
" --index https://wheels.vllm.ai/0.26.0/cu129 \\\n",
53+
" --index-strategy unsafe-best-match\n",
4954
" uv pip install datasets\n",
5055
"else\n",
51-
" pip install \"nemo-safe-synthesizer[engine,cu129]\" --extra-index-url https://flashinfer.ai/whl/cu129 --extra-index-url https://download.pytorch.org/whl/cu129 --extra-index-url https://wheels.vllm.ai/ee0da84ab9e04ac7610e28580af62c365e898389/cu129\n",
56+
" pip install \"nemo-safe-synthesizer[engine,cu129]\" \\\n",
57+
" --extra-index-url https://flashinfer.ai/whl/cu129 \\\n",
58+
" --extra-index-url https://flashinfer.ai/whl/ \\\n",
59+
" --extra-index-url https://download.pytorch.org/whl/cu129 \\\n",
60+
" --extra-index-url https://wheels.vllm.ai/0.26.0/cu129\n",
5261
" pip install datasets\n",
5362
"fi\n"
5463
]

0 commit comments

Comments
 (0)