Skip to content

chore: upgrade vLLM to 0.20.0, cuda to 12.9 - #464

Merged
mckornfield merged 4 commits into
mainfrom
mschwab/chore/bump-vllm-torch-stack
May 14, 2026
Merged

chore: upgrade vLLM to 0.20.0, cuda to 12.9#464
mckornfield merged 4 commits into
mainfrom
mschwab/chore/bump-vllm-torch-stack

Conversation

@mckornfield

@mckornfield mckornfield commented May 4, 2026

Copy link
Copy Markdown
Collaborator

Summary

Pre-Review Checklist

Ensure that the following pass:

  • make format && make check or via prek validation.
  • make test passes locally
  • make test-e2e passes locally
  • make 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

  • New or updated tests for any fix or new behavior
  • Updated documentation for new features and behaviors, including docstrings for API docs.

Other Notes

  • Closes #

Summary by CodeRabbit

  • Documentation

    • Updated CUDA requirement to 12.9+ across all installation guides and prerequisites
    • Clarified Python support for versions 3.11–3.13
    • Updated installation commands and dependency indexes for CUDA 12.9 compatibility
  • Bug Fixes

    • Changed default attention implementation from vLLM Flash Attention 3 to SDPA for improved compatibility
  • Chores

    • Updated core dependencies (PyTorch, vLLM, FlashInfer) to latest versions for CUDA 12.9
    • Disabled vLLM deep GEMM kernel warmup by default for better performance

Review Change Stack

@mckornfield
mckornfield requested review from a team as code owners May 4, 2026 21:35
@codecov

codecov Bot commented May 4, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 80.00000% with 2 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
tests/e2e/test_dataset_config.py 0.00% 1 Missing ⚠️
tests/e2e/test_safe_synthesizer.py 0.00% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

@binaryaaron
binaryaaron self-requested a review May 4, 2026 22:13
@binaryaaron binaryaaron added the dependencies Pull requests that update a dependency file label May 4, 2026
@mckornfield
mckornfield force-pushed the mschwab/chore/bump-vllm-torch-stack branch from b866117 to 4a11f2b Compare May 4, 2026 22:51
@mckornfield
mckornfield force-pushed the mschwab/chore/bump-vllm-torch-stack branch 4 times, most recently from 19c6a3c to 52c86b0 Compare May 8, 2026 00:37
@mckornfield

Copy link
Copy Markdown
Collaborator Author

/sync

Comment thread .github/workflows/gpu-tests.yml Outdated
Comment thread src/nemo_safe_synthesizer/defaults.py Outdated
),
),
] = "kernels-community/vllm-flash-attn3"
] = "sdpa"

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's try FLASH_ATTN- should be bundled.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

uh oh

FAILED tests/e2e/test_safe_synthesizer.py::test_train_and_generate_defaults - ValueError: Specified attn_implementation="FLASH_ATTN" is not supported. The only possible arguments are attn_implementation="eager", "attn_implementation=flash_attention_3", "attn_implementation=flash_attention_2", "attn_implementation=sdpa", "attn_implementation=flex_attention"`.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

flash_attention_3 - my bad. if we have to do spda then that's alright for a bit

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
=============================================================================== short test summary info ===============================================================================
FAILED tests/e2e/test_safe_synthesizer.py::test_train_and_generate_defaults - ImportError: FlashAttention3 has been toggled on, but it cannot be used due to the following error: the package flash_attn_3 seems to be not installed.

gadzooks, looks like we need another dep? (I tried it but saw it wasn't installed)

@mckornfield
mckornfield force-pushed the mschwab/chore/bump-vllm-torch-stack branch from 52c86b0 to 87bc009 Compare May 11, 2026 18:34
@coderabbitai

coderabbitai Bot commented May 11, 2026

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 346c4cb2-567c-4410-b693-ad1129bd9b71

📥 Commits

Reviewing files that changed from the base of the PR and between 54478dc and 3e3949b.

⛔ Files ignored due to path filters (1)
  • uv.lock is excluded by !**/*.lock, !uv.lock
📒 Files selected for processing (32)
  • .agents/skills/git-worktrees/SKILL.md
  • .agents/skills/uv-build/SKILL.md
  • .claude/commands/bootstrap.md
  • .coderabbit.yaml
  • .cursor/setup-worktree.sh
  • .github/actions/setup-gpu-test-env/action.yml
  • AGENTS.md
  • CONTRIBUTING.md
  • Makefile
  • README.md
  • containers/Dockerfile.cuda
  • docs/developer-guide/docker.md
  • docs/index.md
  • docs/tutorials/differential-privacy.ipynb
  • docs/tutorials/safe-synthesizer-101.ipynb
  • docs/user-guide/configuration.md
  • docs/user-guide/docker.md
  • docs/user-guide/getting-started.md
  • docs/user-guide/running.md
  • docs/user-guide/troubleshooting.md
  • pyproject.toml
  • script/slurm/README.md
  • script/slurm/slurm_nss_matrix.sh
  • src/nemo_safe_synthesizer/config/training.py
  • src/nemo_safe_synthesizer/defaults.py
  • src/nemo_safe_synthesizer/generation/regex_manager.py
  • src/nemo_safe_synthesizer/generation/vllm_backend.py
  • tests/TESTING.md
  • tests/e2e/test_dataset_config.py
  • tests/e2e/test_safe_synthesizer.py
  • tests/evaluation/components/benchmark_nearest_neighbor.py
  • tests/training/test_huggingface_backend.py
✅ Files skipped from review due to trivial changes (17)
  • docs/index.md
  • AGENTS.md
  • docs/tutorials/safe-synthesizer-101.ipynb
  • script/slurm/README.md
  • .claude/commands/bootstrap.md
  • CONTRIBUTING.md
  • src/nemo_safe_synthesizer/generation/regex_manager.py
  • docs/user-guide/configuration.md
  • tests/e2e/test_safe_synthesizer.py
  • docs/user-guide/troubleshooting.md
  • docs/user-guide/running.md
  • docs/tutorials/differential-privacy.ipynb
  • tests/TESTING.md
  • docs/user-guide/getting-started.md
  • .agents/skills/uv-build/SKILL.md
  • README.md
  • .agents/skills/git-worktrees/SKILL.md
🚧 Files skipped from review as they are similar to previous changes (14)
  • docs/user-guide/docker.md
  • .cursor/setup-worktree.sh
  • src/nemo_safe_synthesizer/generation/vllm_backend.py
  • containers/Dockerfile.cuda
  • docs/developer-guide/docker.md
  • tests/e2e/test_dataset_config.py
  • tests/evaluation/components/benchmark_nearest_neighbor.py
  • tests/training/test_huggingface_backend.py
  • .github/actions/setup-gpu-test-env/action.yml
  • .coderabbit.yaml
  • src/nemo_safe_synthesizer/defaults.py
  • src/nemo_safe_synthesizer/config/training.py
  • Makefile
  • pyproject.toml
📜 Recent review details
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: Unit Tests (3.12)
  • GitHub Check: Unit Tests (3.11)
  • GitHub Check: Unit Tests (3.13)
🧰 Additional context used
📓 Path-based instructions (6)
**/*.sh

📄 CodeRabbit inference engine (STYLE_GUIDE.md)

**/*.sh: Use shebang #!/usr/bin/env bash (not #!/bin/bash).
Use minimum floor set -eu. Use set -euo pipefail unless pipefail breaks piped-grep patterns in the specific script.
Use snake_case for function names and _ prefix for internal helper functions.
Always quote variables ("$VAR", "${VAR}"). Use defaults via ${VAR:-default}. Use readonly for variables that should not change after assignment.
Detect repo root using REPO_ROOT=${REPO_ROOT:-$(git rev-parse --show-toplevel)}.
Use shellcheck to lint shell scripts. When disabling a check, add # shellcheck disable=SCXXXX with a brief reason.

Files:

  • script/slurm/slurm_nss_matrix.sh

⚙️ CodeRabbit configuration file

Review shell scripts for #!/usr/bin/env bash, set -euo pipefail where appropriate, quoting, repo root detection, and shellcheck compliance.

Files:

  • script/slurm/slurm_nss_matrix.sh
**/*.{py,sh,yaml,yml}

📄 CodeRabbit inference engine (STYLE_GUIDE.md)

Include SPDX copyright header at the top: # SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. and # SPDX-License-Identifier: Apache-2.0. The make format command handles this automatically.

Files:

  • script/slurm/slurm_nss_matrix.sh
**/*

📄 CodeRabbit inference engine (STYLE_GUIDE.md)

**/*: Include a newline at the end of all files, never trailing whitespace. This is enforced by pre-commit.
Use line length of 120 characters for code, comments, and docstrings (configured in ruff.toml).

Files:

  • script/slurm/slurm_nss_matrix.sh

⚙️ CodeRabbit configuration file

**/*: Review as a senior maintainer for NeMo Safe Synthesizer. Prioritize issues that can change behavior, break user workflows, weaken privacy guarantees, hide failures, make tests unreliable, or create maintenance risk. Avoid generic style commentary unless it points to a concrete project convention that automated tools will not catch.
Comment only when the finding is actionable and tied to changed code. For each finding, state the impact, the condition that triggers it, and the smallest practical fix. Prefer one precise comment over broad advice. Do not ask for refactors outside the PR scope unless the changed code creates the problem.
Review type guidance: - Potential issue: use for correctness bugs, data loss, privacy leaks,
security risks, broken public APIs, invalid config behavior, missing
validation, hidden failures, nondeterministic tests, or CI breakage.

  • Refactor suggestion: use for local maintainability problems introduced
    by the diff when they have clear future cost, such as duplicated setup,
    unclear boundaries, over-mocking, avoidable complexity, or opaque test
    helpers.
  • Nitpick: avoid in chill mode. Do not emit formatting, import-order,
    wording, or style-only comments unless automated tools cannot catch the
    issue and it affects maintainability.

Severity guidance: - Critical: security/privacy leaks, data loss, training/test/holdout
contamination, or broken release/package/core pipeline execution.

  • Major: incorrect generation/training/evaluation behavior, broken
    CLI/SDK public API, invalid config defaults or validators, or GPU/vLLM
    cleanup and process-isolation bugs likely to fail CI or production
    runs.
  • Minor: localized bugs, missing focused tests for changed behavior, or
    bad test patterns that weaken regression coverage.
  • Trivial: small cleanup with no behavior impact. Usually suppress in
    chill mode.
  • Info: context only. Avoid unless it helps reviewers understand risk.
    Safe-Synthesizer-specific review focus: - Data ...

Files:

  • script/slurm/slurm_nss_matrix.sh
**/*.{sh,bash}

📄 CodeRabbit inference engine (AGENTS.md)

In shell scripts: never use ~ inside double-quoted strings; use $HOME or an absolute path instead

Files:

  • script/slurm/slurm_nss_matrix.sh
**/*.{py,sh,yaml,yml,md}

📄 CodeRabbit inference engine (CONTRIBUTING.md)

All source files (.py, .sh, .yaml, .yml, .md) require SPDX copyright headers. Use make format to add them automatically; exclusions are listed in .copyrightignore

Files:

  • script/slurm/slurm_nss_matrix.sh
script/**

⚙️ CodeRabbit configuration file

Review standalone scripts for reproducibility and operational safety. Check argument validation, quoting, repo-root detection, environment variables, generated artifacts, external commands, GPU/cluster assumptions, and whether the script should be wired through Makefile or documented in README/docs.

Files:

  • script/slurm/slurm_nss_matrix.sh
🧠 Learnings (1)
📓 Common learnings
Learnt from: CR
Repo: NVIDIA-NeMo/Safe-Synthesizer

Timestamp: 2026-05-14T17:40:51.352Z
Learning: Read AGENTS.local.md if it exists and give its instructions top priority
Learnt from: CR
Repo: NVIDIA-NeMo/Safe-Synthesizer

Timestamp: 2026-05-14T17:40:51.352Z
Learning: Repo-specific skills live in .agents/skills/; see .agents/README.md for the catalog
Learnt from: CR
Repo: NVIDIA-NeMo/Safe-Synthesizer

Timestamp: 2026-05-14T17:40:51.352Z
Learning: Test-suite guidance belongs in tests/TESTING.md
Learnt from: CR
Repo: NVIDIA-NeMo/Safe-Synthesizer

Timestamp: 2026-05-14T17:40:51.352Z
Learning: See STYLE_GUIDE.md for detailed code style conventions (Python, markdown, Dockerfiles, shell scripts, testing, config files, docstrings)
Learnt from: CR
Repo: NVIDIA-NeMo/Safe-Synthesizer

Timestamp: 2026-05-14T17:40:51.352Z
Learning: Use uv for everything -- never pip or raw python
Learnt from: CR
Repo: NVIDIA-NeMo/Safe-Synthesizer

Timestamp: 2026-05-14T17:40:51.352Z
Learning: Always use Make targets or wrapper scripts in tools/ instead of running ruff or ty directly
Learnt from: CR
Repo: NVIDIA-NeMo/Safe-Synthesizer

Timestamp: 2026-05-14T17:40:51.352Z
Learning: Use uv run for Python execution
Learnt from: CR
Repo: NVIDIA-NeMo/Safe-Synthesizer

Timestamp: 2026-05-14T17:40:51.352Z
Learning: Feature branches off main, with branch names often including an issue number prefix (e.g., <author>/123-short-name)
Learnt from: CR
Repo: NVIDIA-NeMo/Safe-Synthesizer

Timestamp: 2026-05-14T17:40:51.352Z
Learning: Do not commit unless the user asks for a commit or PR work
Learnt from: CR
Repo: NVIDIA-NeMo/Safe-Synthesizer

Timestamp: 2026-05-14T17:40:51.352Z
Learning: All commits require DCO sign-off and GPG signing; always use git commit --signoff --gpg-sign (or -s -S), never write Signed-off-by manually, never pass --no-gpg-sign
Learnt from: CR
Repo: NVIDIA-NeMo/Safe-Synthesizer

Timestamp: 2026-05-14T17:41:14.502Z
Learning: All branches (except `main`) must follow the naming pattern: `<author>/<description>`, `<author>/<issue-id>-<description>`, `<author>/<type>/<description>`, or `<author>/<type>/<issue-id>-<description>` where author is GitHub username (lowercase, alphanumeric, hyphens), type is one of: feature, bugfix, hotfix, release, docs, chore, test
Learnt from: CR
Repo: NVIDIA-NeMo/Safe-Synthesizer

Timestamp: 2026-05-14T17:41:14.502Z
Learning: All commits merged to `main` must follow Conventional Commits specification: `<type>(<scope>): <description>` where type is one of: feat, fix, docs, style, refactor, perf, test, build, ci, chore, revert. Description must be max 100 characters. Add `!` after type/scope for breaking changes.
Learnt from: CR
Repo: NVIDIA-NeMo/Safe-Synthesizer

Timestamp: 2026-05-14T17:41:14.502Z
Learning: All contributions must include Developer Certificate of Origin (DCO) sign-off by adding `Signed-off-by: Your Name <your.emailexample.com>` line to commit messages using `git commit -s`
Learnt from: CR
Repo: NVIDIA-NeMo/Safe-Synthesizer

Timestamp: 2026-05-14T17:41:14.502Z
Learning: This repository requires verified commits. The `main` branch Ruleset enforces `required_signatures`, so unsigned commits will block PR merges. Use either SSH signing (recommended) or GPG signing.
Learnt from: CR
Repo: NVIDIA-NeMo/Safe-Synthesizer

Timestamp: 2026-05-14T17:41:14.502Z
Learning: Create an issue first (if one doesn't exist) before making changes, create a branch following the naming convention, make changes with conventional commits, run `make test` locally, push branch, open Pull Request using the PR template, and address all review feedback before merge
Learnt from: CR
Repo: NVIDIA-NeMo/Safe-Synthesizer

Timestamp: 2026-05-14T17:41:14.502Z
Learning: Use `make` targets (`make format`, `make check`, `make test`) instead of running `ruff` or `ty` directly. These targets use pinned tool versions from `.mise.toml` and `.mise.lock`
Learnt from: CR
Repo: NVIDIA-NeMo/Safe-Synthesizer

Timestamp: 2026-05-14T17:41:14.502Z
Learning: Run `make format` to auto-fix: ruff format + import sorting + copyright headers for all tracked files before submission
Learnt from: CR
Repo: NVIDIA-NeMo/Safe-Synthesizer

Timestamp: 2026-05-14T17:41:14.502Z
Learning: Run `make check` (read-only check: format + lint + typecheck + copyright) before submission to replicate all CI code-quality checks locally
Learnt from: CR
Repo: NVIDIA-NeMo/Safe-Synthesizer

Timestamp: 2026-05-14T17:41:14.502Z
Learning: All new features must include tests, and bug fixes must include regression tests. Run `make test` to execute unit tests before submitting PR
Learnt from: CR
Repo: NVIDIA-NeMo/Safe-Synthesizer

Timestamp: 2026-05-14T17:41:14.502Z
Learning: Python, markdown, Dockerfiles, shell scripts, testing, and docstrings must follow guidelines in STYLE_GUIDE.md
Learnt from: CR
Repo: NVIDIA-NeMo/Safe-Synthesizer

Timestamp: 2026-05-14T17:41:14.502Z
Learning: Add new documentation pages to `docs/` following the Diataxis framework (getting-started/, user-guide/, architecture/, reference/, blog/), then add the page to the `nav:` section of `mkdocs.yml`
Learnt from: CR
Repo: NVIDIA-NeMo/Safe-Synthesizer

Timestamp: 2026-05-14T17:41:14.502Z
Learning: Release versions must follow PEP440 with major.minor.patch release numbers. Use stable releases and release candidates only; prerelease versions append rcN suffix (no dash). GitHub tags must start with `v` prefix (e.g., `v1.0.0`, `v0.0.5rc0`)
Learnt from: CR
Repo: NVIDIA-NeMo/Safe-Synthesizer

Timestamp: 2026-05-14T17:41:14.502Z
Learning: Respond to PR review comments in the GitHub console. When changes are made, re-request review. Use the Assignees list to indicate who's expected to take the next action (PR author after reviewer comments, or reviewer after updates)
Learnt from: CR
Repo: NVIDIA-NeMo/Safe-Synthesizer

Timestamp: 2026-05-14T17:41:14.502Z
Learning: CODEOWNERS file specifies: all `src/` and `test/` files are owned by `NVIDIA-NeMo/safe-synthesizer-reviewers`; all remaining files (`pyproject.toml`, `uv.lock`, `SECURITY.md`, `LICENSE`, `.github/`, etc.) are owned by `NVIDIA-NeMo/safe-synthesizer-maintainers`
Learnt from: CR
Repo: NVIDIA-NeMo/Safe-Synthesizer

Timestamp: 2026-05-14T17:41:14.502Z
Learning: The `main` branch requires: 1 approval, code owner review, signed commits, linear history, status checks, conversation resolution, and enforces squash-only merging with force-push and deletion blocking
Learnt from: CR
Repo: NVIDIA-NeMo/Safe-Synthesizer

Timestamp: 2026-05-14T17:41:14.502Z
Learning: For local development with NMP, use Makefile targets `make use-nss-local` to build and patch, and `make use-nss-artifactory` to revert before committing
Learnt from: CR
Repo: NVIDIA-NeMo/Safe-Synthesizer

Timestamp: 2026-05-14T17:41:32.096Z
Learning: Review root `conftest.py` for auto-marking, `load_test_dataset`/`load_test_dataframe` helpers, and `fixture_mock_processor` pattern before writing tests
Learnt from: CR
Repo: NVIDIA-NeMo/Safe-Synthesizer

Timestamp: 2026-05-14T17:41:32.096Z
Learning: Review `pytest.ini` for markers, asyncio configuration, and timeout settings before running tests
Learnt from: CR
Repo: NVIDIA-NeMo/Safe-Synthesizer

Timestamp: 2026-05-14T17:41:32.096Z
Learning: Review `tests/evaluation/conftest.py` for Faker-based `make_df` and nullable dtype conversion patterns when writing evaluation tests
Learnt from: CR
Repo: NVIDIA-NeMo/Safe-Synthesizer

Timestamp: 2026-05-14T17:41:32.096Z
Learning: Review `tests/generation/conftest.py` for JSONL/schema fixtures and `fixture_valid_iris_dataset_jsonl_and_schema` patterns when writing generation tests
Learnt from: CR
Repo: NVIDIA-NeMo/Safe-Synthesizer

Timestamp: 2026-05-14T17:41:32.096Z
Learning: Auto-marking assigns markers based on test path: `/e2e/` -> `e2e`, `/smoke/` -> `smoke`, else `unit` (only if no category marker already present on test item)
Learnt from: CR
Repo: NVIDIA-NeMo/Safe-Synthesizer

Timestamp: 2026-05-14T17:41:32.096Z
Learning: Mirror source code structure with test structure: create `tests/training/`, `tests/generation/`, `tests/evaluation/`, etc. corresponding to source directories
Learnt from: CR
Repo: NVIDIA-NeMo/Safe-Synthesizer

Timestamp: 2026-05-14T17:41:32.096Z
Learning: Run single test with: `uv run --frozen pytest tests/path/test_file.py::test_name -vvs -n0`
Learnt from: CR
Repo: NVIDIA-NeMo/Safe-Synthesizer

Timestamp: 2026-05-14T17:41:32.096Z
Learning: Use test runner: `uv run --frozen pytest -n auto --dist loadscope -vv` for standard test execution
Learnt from: CR
Repo: NVIDIA-NeMo/Safe-Synthesizer

Timestamp: 2026-05-14T17:41:32.096Z
Learning: Place test data files in `tests/stub_datasets/` for sample datasets and `tests/test_data/tokenizers/` for full tokenizer configs
🪛 Shellcheck (0.11.0)
script/slurm/slurm_nss_matrix.sh

[info] 123-123: Not following: ./.venv/bin/activate was not specified as input (see shellcheck -x).

(SC1091)

🔇 Additional comments (1)
script/slurm/slurm_nss_matrix.sh (1)

115-119: LGTM!

Also applies to: 124-124


Walkthrough

This PR upgrades CUDA from version 12.8 to 12.9 across the codebase, changes the default attention implementation from a kernels-community vLLM backend to PyTorch SDPA, updates PyTorch/FlashInfer/vLLM versions, disables vLLM deep_gemm by default, and revises all documentation and tests accordingly.

Changes

CUDA 12.9 & Attention Implementation Upgrade

Layer / File(s) Summary
Dependency Configuration
pyproject.toml
Core pyproject.toml updated: cpu extra uses flashinfer 0.6.8.post1 and vllm 0.20.0; cu129 extra added with cu129-suffixed wheels; cu128 extra removed; tool.uv conflicts/overrides/sources rewired from cu128 to cu129; indexes point to pytorch-cu129 and vllm-v0-20-0-cu129.
Pipeline & Config Defaults
src/nemo_safe_synthesizer/defaults.py, src/nemo_safe_synthesizer/config/training.py
DEFAULT_ATTN_IMPLEMENTATION changed to FLASH_ATTN; TrainingHyperparams.attn_implementation defaults to sdpa instead of kernels-community vLLM path, with updated description listing alternatives.
Build System Configuration
Makefile, .github/actions/setup-gpu-test-env/action.yml
PYTORCH_DEPS defaults to cu129; BOOTSTRAP_EXTRAS includes cu129; bootstrap-nss uses cu129 extras; nss_combo_test runs cu129 targets; GitHub Action cuda-extra input defaults to cu129.
Container Infrastructure
containers/Dockerfile.cuda
Base image bumped to CUDA 12.9.1; deps layer and project installation use --extra cu129; dev stage also uses cu129; stage documentation updated.
Installation & Quick Start Documentation
README.md, docs/user-guide/getting-started.md, AGENTS.md, CONTRIBUTING.md
Quick Start commands use cu129 extras and indexes; getting-started specifies CUDA 12.9+ and Python 3.11–3.13 support; README attention config example uses sdpa default.
Developer Setup & Skill Documentation
.agents/skills/*, .claude/commands/bootstrap.md, .cursor/setup-worktree.sh
Agent skill docs and Claude commands reference cu129 targets and extras; cursor setup script shows cu129 installation guidance.
Deployment Scripts & CI Documentation
script/slurm/*, tests/TESTING.md
Slurm scripts bootstrap with cu129 target and use cu129 extras/indexes; TESTING.md documents cu129 requirement for e2e and CI tests.
Developer & User Guides
docs/index.md, docs/developer-guide/docker.md, docs/user-guide/*.md
System requirements updated to CUDA 12.9+; Docker guides reference cu129 and 12.9.1 base image; configuration and running guides document sdpa as default attention; troubleshooting clarifies kernels package requirement.
Tutorial Notebooks
docs/tutorials/*.ipynb
Differential-privacy and safe-synthesizer-101 tutorials updated to CUDA 12.9+ prerequisites and cu129 installation commands with corresponding wheel indexes.
Test Updates
tests/e2e/*.py, tests/training/test_huggingface_backend.py, tests/evaluation/components/benchmark_nearest_neighbor.py
E2E test skip messages reference cu129; huggingface backend tests expect sdpa when kernels is available; benchmark docstring uses cu129.
Runtime Configuration & Adjustments
src/nemo_safe_synthesizer/generation/vllm_backend.py, src/nemo_safe_synthesizer/generation/regex_manager.py, .coderabbit.yaml
vllm_backend.py disables VLLM_USE_DEEP_GEMM by default; regex_manager.py imports from outlines_core._json_schema; coderabbit.yaml enables chat auto_reply.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Suggested labels

dependencies

Suggested reviewers

  • kendrickb-nvidia
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main changes: upgrading vLLM to 0.20.0 and CUDA to 12.9, which are the primary objectives of this changeset.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch mschwab/chore/bump-vllm-torch-stack

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 Trivy (0.69.3)

Trivy execution failed: 2026-05-14T17:42:18Z FATAL Fatal error run error: fs scan error: scan error: scan failed: failed analysis: post analysis error: post analysis error: kubernetes scan error: fs filter error: fs filter error: walk error range error: stat .coderabbit-opengrep-fallback.yml: no such file or directory: range error: stat .coderabbit-opengrep-fallback.yml: no such file or directory


Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot added docs Documentation-only change python area:ci test Test-only addition or change area:build-dist and removed dependencies Pull requests that update a dependency file labels May 11, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (6)
docs/user-guide/docker.md (1)

16-23: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Update the CUDA verification image to match the 12.9 prerequisite.

Line 16 documents CUDA 12.9 as the baseline, but the verification command on line 22 uses cuda:12.8.1-runtime-ubuntu22.04. This mismatch can lead to environment checks against the wrong version. Per the documentation guidelines for this file, the GPU verification snippet should reflect the supported CUDA version.

Suggested patch
-docker run --rm --gpus all nvidia/cuda:12.8.1-runtime-ubuntu22.04 nvidia-smi
+docker run --rm --gpus all nvidia/cuda:12.9.0-runtime-ubuntu22.04 nvidia-smi
README.md (1)

208-228: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Fix the training attention example before users copy it.

The example now says spda, but the valid value in the table is sdpa, and the paragraph/table still describe the old kernels-community/vllm-flash-attn3 default. Copy-pasting this section now either passes an invalid backend name or teaches the pre-PR default. Please update the example and the default/fallback text together.

src/nemo_safe_synthesizer/config/training.py (1)

245-259: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Fix config default to use a valid HuggingFace attention implementation identifier.

attn_implementation defaults to "FLASH_ATTN", which is not a valid HuggingFace attention implementation. The field feeds HuggingFace's model loader via _resolve_attn_implementation(), which passes non-kernels-community/ values through as-is. This means "FLASH_ATTN" will be rejected by HuggingFace. The description correctly documents valid HF values (sdpa, eager, flash_attention_2), and tests reset the field to "sdpa", indicating that is the intended default. Change the default from "FLASH_ATTN" to "sdpa" (or another valid HF identifier you intend), and ensure the description and implementation remain aligned.

docs/developer-guide/docker.md (1)

99-105: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Update the Build Arguments table default for CUDA_VERSION.

The table still lists 12.8.1, but this PR moves the Docker stack to 12.9.1. That mismatch can cause users to build against the wrong CUDA base if they follow the table.

Suggested doc fix
-| `CUDA_VERSION` | `12.8.1` | CUDA toolkit version in the base image tag |
+| `CUDA_VERSION` | `12.9.1` | CUDA toolkit version in the base image tag |

As per coding guidelines: "If CUDA version or extras change, update the documented CUDA base image tags."

.agents/skills/uv-build/SKILL.md (1)

5-5: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Update stale trigger keyword from cu128 to cu129.

Line 5 still lists cu128 in the skill trigger description, which is now out of sync with the rest of this skill doc and can misroute trigger matching.

Proposed fix
-description: "uv package management, dependency groups, PyTorch index handling, hatch build system, and versioning for this repo. Triggers on: uv, uv sync, uv lock, uv add, uv build, dependency, pyproject.toml, extras, cpu, cu128, hatch, wheel, version, publish."
+description: "uv package management, dependency groups, PyTorch index handling, hatch build system, and versioning for this repo. Triggers on: uv, uv sync, uv lock, uv add, uv build, dependency, pyproject.toml, extras, cpu, cu129, hatch, wheel, version, publish."
Makefile (1)

89-96: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Sync bootstrap-nss usage text with supported extras.

Lines 89 and 95 still advertise {dev,engine,cpu,cuda} even though cu129 is now a first-class extra. This creates avoidable workflow confusion when reading in-file help.

Proposed fix
-# Usage: make bootstrap-nss {dev,engine,cpu,cuda}
+# Usage: make bootstrap-nss {dev,engine,cpu,cuda,cu129}
 ...
-bootstrap-nss: .venv ## Bootstrap Python dependencies. Usage: make bootstrap-nss {dev,engine,cpu,cuda}
+bootstrap-nss: .venv ## Bootstrap Python dependencies. Usage: make bootstrap-nss {dev,engine,cpu,cuda,cu129}

As per coding guidelines: “Treat Makefile targets as the validation source of truth. Check that new targets are documented with target-name: ## Description...”.


ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: ec1cf8d1-908f-4de0-b7a9-4fd65ed3e735

📥 Commits

Reviewing files that changed from the base of the PR and between cbf9104 and 87bc009.

⛔ Files ignored due to path filters (1)
  • uv.lock is excluded by !**/*.lock, !uv.lock
📒 Files selected for processing (28)
  • .agents/skills/git-worktrees/SKILL.md
  • .agents/skills/uv-build/SKILL.md
  • .claude/commands/bootstrap.md
  • .coderabbit.yaml
  • .cursor/setup-worktree.sh
  • .github/actions/setup-gpu-test-env/action.yml
  • AGENTS.md
  • CONTRIBUTING.md
  • Makefile
  • README.md
  • containers/Dockerfile.cuda
  • docs/developer-guide/docker.md
  • docs/index.md
  • docs/user-guide/configuration.md
  • docs/user-guide/docker.md
  • docs/user-guide/getting-started.md
  • pyproject.toml
  • script/slurm/README.md
  • script/slurm/slurm_nss_matrix.sh
  • src/nemo_safe_synthesizer/config/training.py
  • src/nemo_safe_synthesizer/defaults.py
  • src/nemo_safe_synthesizer/generation/regex_manager.py
  • src/nemo_safe_synthesizer/generation/vllm_backend.py
  • tests/TESTING.md
  • tests/e2e/test_dataset_config.py
  • tests/e2e/test_safe_synthesizer.py
  • tests/evaluation/components/benchmark_nearest_neighbor.py
  • tests/training/test_huggingface_backend.py
📜 Review details
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: Unit Tests (3.11)
  • GitHub Check: Unit Tests (3.13)
  • GitHub Check: Unit Tests (3.12)
🧰 Additional context used
📓 Path-based instructions (28)
**/*.md

📄 CodeRabbit inference engine (STYLE_GUIDE.md)

**/*.md: Do not use decorative **bold** in body text, list items, or docstrings. Use headers, list markers, colons, and backticks for structure. Bold is acceptable in table header-like cells and MkDocs Material card grid titles.
Use -- (em-dash) for asides, not - (hyphen).
Use single backticks for code identifiers, paths, and CLI commands in Markdown.
Use Mermaid diagrams with no spaces in node IDs, quoted labels with special characters, and no explicit colors or styles.
Include SPDX copyright header at the top using HTML-comment syntax (<!-- ... -->).
If a Markdown file starts with YAML frontmatter (---), place the SPDX copyright header inside the frontmatter block using hash-comment syntax, not HTML comments.
Limit line length to 120 characters in Markdown files.

Files:

  • docs/user-guide/docker.md
  • docs/user-guide/configuration.md
  • docs/index.md
  • script/slurm/README.md
  • tests/TESTING.md
  • AGENTS.md
  • README.md
  • docs/developer-guide/docker.md
  • CONTRIBUTING.md
  • docs/user-guide/getting-started.md
docs/**/*.md

📄 CodeRabbit inference engine (STYLE_GUIDE.md)

Classify documentation pages as tutorial, how-to, explanation, or reference per the Diataxis framework. Use MkDocs Material syntax: admonitions (!!! note), tabs (===), code blocks with titles and highlights.

docs/**/*.md: Classify documentation content using the Diataxis framework (TUTORIAL, HOW-TO, EXPLANATION, or REFERENCE) before writing, ensuring each page fits exactly ONE type
Use cross-links between different Diataxis content types (TUTORIAL, HOW-TO, EXPLANATION, REFERENCE) to connect related documentation
Use MkDocs Material admonitions syntax for notes, warnings, and collapsible tips: !!! note, !!! warning, ??? tip
Use MkDocs Material tabs syntax (=== "Label") for presenting multiple examples or implementations side-by-side
Use code blocks with metadata (title, hl_lines) to highlight relevant code snippets in documentation examples
Use Mermaid diagrams (flowchart, sequence diagrams, etc.) for visualizing architecture, workflows, and concepts in documentation
Write documentation following high signal-to-noise principles: every sentence must earn its place by providing essential information
Use progressive disclosure in documentation: start with simple concepts, then layer complexity for advanced readers
Include working code examples in documentation; ensure all code snippets are tested and actually work
List all prerequisites at the top of documentation pages before diving into main content
End documentation pages with 'Next steps' section containing links to related content and logical progression points

Documentation files under docs/ should follow Diataxis framework organization: docs/getting-started/ for tutorials, docs/user-guide/ for how-tos, docs/architecture/ for explanations, docs/reference/ for API reference, docs/blog/ for dev notes

Use MkDocs Material Markdown extensions in documentation: admonitions (!!! note), content tabs, code blocks with annotations, Mermaid diagrams, task lists, footnotes, definition lists

Files:

  • docs/user-guide/docker.md
  • docs/user-guide/configuration.md
  • docs/index.md
  • docs/developer-guide/docker.md
  • docs/user-guide/getting-started.md
**/*

📄 CodeRabbit inference engine (STYLE_GUIDE.md)

**/*: Remove all trailing whitespace from files.
Use single space between sentences, never two spaces.

Files:

  • docs/user-guide/docker.md
  • docs/user-guide/configuration.md
  • docs/index.md
  • script/slurm/README.md
  • tests/TESTING.md
  • AGENTS.md
  • README.md
  • containers/Dockerfile.cuda
  • tests/evaluation/components/benchmark_nearest_neighbor.py
  • src/nemo_safe_synthesizer/generation/vllm_backend.py
  • docs/developer-guide/docker.md
  • CONTRIBUTING.md
  • src/nemo_safe_synthesizer/generation/regex_manager.py
  • tests/e2e/test_safe_synthesizer.py
  • tests/e2e/test_dataset_config.py
  • src/nemo_safe_synthesizer/defaults.py
  • docs/user-guide/getting-started.md
  • script/slurm/slurm_nss_matrix.sh
  • src/nemo_safe_synthesizer/config/training.py
  • tests/training/test_huggingface_backend.py
  • Makefile
  • pyproject.toml

⚙️ CodeRabbit configuration file

**/*: Review as a senior maintainer for NeMo Safe Synthesizer. Prioritize issues that can change behavior, break user workflows, weaken privacy guarantees, hide failures, make tests unreliable, or create maintenance risk. Avoid generic style commentary unless it points to a concrete project convention that automated tools will not catch.
Comment only when the finding is actionable and tied to changed code. For each finding, state the impact, the condition that triggers it, and the smallest practical fix. Prefer one precise comment over broad advice. Do not ask for refactors outside the PR scope unless the changed code creates the problem.
Review type guidance: - Potential issue: use for correctness bugs, data loss, privacy leaks,
security risks, broken public APIs, invalid config behavior, missing
validation, hidden failures, nondeterministic tests, or CI breakage.

  • Refactor suggestion: use for local maintainability problems introduced
    by the diff when they have clear future cost, such as duplicated setup,
    unclear boundaries, over-mocking, avoidable complexity, or opaque test
    helpers.
  • Nitpick: avoid in chill mode. Do not emit formatting, import-order,
    wording, or style-only comments unless automated tools cannot catch the
    issue and it affects maintainability.

Severity guidance: - Critical: security/privacy leaks, data loss, training/test/holdout
contamination, or broken release/package/core pipeline execution.

  • Major: incorrect generation/training/evaluation behavior, broken
    CLI/SDK public API, invalid config defaults or validators, or GPU/vLLM
    cleanup and process-isolation bugs likely to fail CI or production
    runs.
  • Minor: localized bugs, missing focused tests for changed behavior, or
    bad test patterns that weaken regression coverage.
  • Trivial: small cleanup with no behavior impact. Usually suppress in
    chill mode.
  • Info: context only. Avoid unless it helps reviewers understand risk.
    Safe-Synthesizer-specific review focus: - Data ...

Files:

  • docs/user-guide/docker.md
  • docs/user-guide/configuration.md
  • docs/index.md
  • script/slurm/README.md
  • tests/TESTING.md
  • AGENTS.md
  • README.md
  • containers/Dockerfile.cuda
  • tests/evaluation/components/benchmark_nearest_neighbor.py
  • src/nemo_safe_synthesizer/generation/vllm_backend.py
  • docs/developer-guide/docker.md
  • CONTRIBUTING.md
  • src/nemo_safe_synthesizer/generation/regex_manager.py
  • tests/e2e/test_safe_synthesizer.py
  • tests/e2e/test_dataset_config.py
  • src/nemo_safe_synthesizer/defaults.py
  • docs/user-guide/getting-started.md
  • script/slurm/slurm_nss_matrix.sh
  • src/nemo_safe_synthesizer/config/training.py
  • tests/training/test_huggingface_backend.py
  • Makefile
  • pyproject.toml
**/*.{md,markdown,py}

📄 CodeRabbit inference engine (.cursor/rules/agent-markdown-style.mdc)

**/*.{md,markdown,py}: Avoid decorative bold (**text**) in list items, body text, and docstrings; use structural cues (headers, list markers, colons, backticks) for emphasis instead
Use backticks for code identifiers, paths, and CLI commands in markdown and docstrings

Files:

  • docs/user-guide/docker.md
  • docs/user-guide/configuration.md
  • docs/index.md
  • script/slurm/README.md
  • tests/TESTING.md
  • AGENTS.md
  • README.md
  • tests/evaluation/components/benchmark_nearest_neighbor.py
  • src/nemo_safe_synthesizer/generation/vllm_backend.py
  • docs/developer-guide/docker.md
  • CONTRIBUTING.md
  • src/nemo_safe_synthesizer/generation/regex_manager.py
  • tests/e2e/test_safe_synthesizer.py
  • tests/e2e/test_dataset_config.py
  • src/nemo_safe_synthesizer/defaults.py
  • docs/user-guide/getting-started.md
  • src/nemo_safe_synthesizer/config/training.py
  • tests/training/test_huggingface_backend.py
**/*.{md,markdown}

📄 CodeRabbit inference engine (.cursor/rules/agent-markdown-style.mdc)

**/*.{md,markdown}: Bold is acceptable only in markdown tables where it's the conventional way to mark header-like cells in the body
Use ## headers to segment markdown sections instead of bold text
Use -- (em-dash) instead of - (hyphen) for asides in markdown

Files:

  • docs/user-guide/docker.md
  • docs/user-guide/configuration.md
  • docs/index.md
  • script/slurm/README.md
  • tests/TESTING.md
  • AGENTS.md
  • README.md
  • docs/developer-guide/docker.md
  • CONTRIBUTING.md
  • docs/user-guide/getting-started.md
**/*.{py,sh,yaml,yml,md}

📄 CodeRabbit inference engine (CONTRIBUTING.md)

All source files (.py, .sh, .yaml, .yml, .md) require SPDX copyright headers; make format adds them automatically with exclusions listed in .copyrightignore

Files:

  • docs/user-guide/docker.md
  • docs/user-guide/configuration.md
  • docs/index.md
  • script/slurm/README.md
  • tests/TESTING.md
  • AGENTS.md
  • README.md
  • tests/evaluation/components/benchmark_nearest_neighbor.py
  • src/nemo_safe_synthesizer/generation/vllm_backend.py
  • docs/developer-guide/docker.md
  • CONTRIBUTING.md
  • src/nemo_safe_synthesizer/generation/regex_manager.py
  • tests/e2e/test_safe_synthesizer.py
  • tests/e2e/test_dataset_config.py
  • src/nemo_safe_synthesizer/defaults.py
  • docs/user-guide/getting-started.md
  • script/slurm/slurm_nss_matrix.sh
  • src/nemo_safe_synthesizer/config/training.py
  • tests/training/test_huggingface_backend.py
docs/**

⚙️ CodeRabbit configuration file

Review documentation as MkDocs Material content. Check Diataxis fit, accurate commands, internal links, code fences, and markdown style from STYLE_GUIDE.md.

Files:

  • docs/user-guide/docker.md
  • docs/user-guide/configuration.md
  • docs/index.md
  • docs/developer-guide/docker.md
  • docs/user-guide/getting-started.md
script/**

⚙️ CodeRabbit configuration file

Review standalone scripts for reproducibility and operational safety. Check argument validation, quoting, repo-root detection, environment variables, generated artifacts, external commands, GPU/cluster assumptions, and whether the script should be wired through Makefile or documented in README/docs.

Files:

  • script/slurm/README.md
  • script/slurm/slurm_nss_matrix.sh
tests/**

📄 CodeRabbit inference engine (.cursor/rules/repo-navigation.mdc)

Tests should mirror the src/ directory structure in tests/

Files:

  • tests/TESTING.md
  • tests/evaluation/components/benchmark_nearest_neighbor.py
  • tests/e2e/test_safe_synthesizer.py
  • tests/e2e/test_dataset_config.py
  • tests/training/test_huggingface_backend.py
AGENTS.md

📄 CodeRabbit inference engine (.cursor/rules/repo-navigation.mdc)

Agent guide with module map and conventions should be documented in AGENTS.md

Files:

  • AGENTS.md
.claude/commands/**

📄 CodeRabbit inference engine (.cursor/rules/claude-commands.mdc)

Pre-defined command files live in .claude/commands/. When a user asks about a development task, read the corresponding file for instructions. Available commands include: unit-test (run unit tests), test-slow (all tests including slow), test-ci-container (CI tests in a container), gpu-test (GPU integration and e2e tests), format (format code with ruff + copyright), lint (lint and typecheck), bootstrap (bootstrap dev environment), build-wheel (build Python wheel), build-docs (build documentation site), start-docs-server (local docs dev server).

Files:

  • .claude/commands/bootstrap.md
README.md

⚙️ CodeRabbit configuration file

Treat README.md as the project overview. Check that setup, usage, and links stay consistent with CONTRIBUTING.md, Makefile, and docs/.

Files:

  • README.md
.agents/skills/**

📄 CodeRabbit inference engine (.cursor/rules/repo-navigation.mdc)

Skills should be stored in .agents/skills/ directory with each skill having a SKILL.md file and optional references subdirectory

Files:

  • .agents/skills/git-worktrees/SKILL.md
  • .agents/skills/uv-build/SKILL.md
containers/Dockerfile*

📄 CodeRabbit inference engine (STYLE_GUIDE.md)

containers/Dockerfile*: Use multi-stage builds for production images.
Copy uv from ghcr.io/astral-sh/uv:<version>.
Use --mount=type=cache for pip/uv caches and APT (/var/cache/apt, /var/lib/apt/lists). Prefer cache mounts over rm -rf /var/lib/apt/lists/*.
Use ENV UV_LINK_MODE=copy when using cache mounts to prevent hardlinks from vanishing after unmount.
Use --no-install-recommends on all apt-get install invocations.
Create a non-root user (appuser) and set NVIDIA_VISIBLE_DEVICES=all for GPU access.
Use tini or --init for proper PID 1 signal handling in batch containers.
Order COPY directives for cache efficiency (dependencies before source).
Include comments explaining cache invalidation points in Dockerfiles.

Files:

  • containers/Dockerfile.cuda
containers/**

⚙️ CodeRabbit configuration file

Review container changes against STYLE_GUIDE.md and containers/README.md. Check cache mounts, uv usage, non-root runtime behavior, CUDA settings, and copy order.

Files:

  • containers/Dockerfile.cuda
.github/**

⚙️ CodeRabbit configuration file

Review GitHub configuration for branch protection expectations, CODEOWNERS alignment, least privilege permissions, pinned actions where practical, and consistency with CONTRIBUTING.md.

Files:

  • .github/actions/setup-gpu-test-env/action.yml
**/*.py

📄 CodeRabbit inference engine (STYLE_GUIDE.md)

**/*.py: Use American English spelling: 'initialize' not 'initialise', 'recognize' not 'recognise', 'color' not 'colour'.
Use observability.get_logger(__name__) for logging -- never logging.getLogger() or structlog.get_logger() directly.
Category loggers: use .runtime for internals, .user for progress/results, .system for system events.
Never use print() for operational output in library code. Use click.echo() for CLI output or sys.stdout.write() for raw output in tools.
Use extra={} for data that downstream tools should query or aggregate (metrics, counts, durations). f-strings are fine for human-readable context.
Use X | Y instead of Optional[X] or Union[X, Y]. Use list[str] instead of List[str], dict[str, int] instead of Dict[str, int].
Use Self for fluent method returns that return the same instance type.
Use collection ABCs for function arguments (Sequence, Mapping, Iterable) so callers can pass any compatible container; use concrete types for return values so callers know exactly what they get.
Use Protocol for structural subtyping when you need duck-typing boundaries. Avoid Any -- prefer object, generics, or Protocol.
Prefer match/case for dispatch on types or tagged values. Use if/elif for simple boolean predicates.
Prefer comprehensions over imperative loops where intent is clearer. Avoid multiple for clauses -- optimize for readability, not conciseness.
Prefer clamping/saturation over raising when out-of-range inputs shouldn't crash the system. Return a bounded value with a log warning instead of raising.
If a function has more than two levels of indentation beyond def, it needs refactoring. Use guard clauses, extract inner loops, generators, or functional decomposition.
When a condition is complex boolean logic, name each piece with a descriptive boolean variable or extract it into a named predicate function.
Error messages must precisely match the actual error condition. Interpolated pieces ...

Files:

  • tests/evaluation/components/benchmark_nearest_neighbor.py
  • src/nemo_safe_synthesizer/generation/vllm_backend.py
  • src/nemo_safe_synthesizer/generation/regex_manager.py
  • tests/e2e/test_safe_synthesizer.py
  • tests/e2e/test_dataset_config.py
  • src/nemo_safe_synthesizer/defaults.py
  • src/nemo_safe_synthesizer/config/training.py
  • tests/training/test_huggingface_backend.py
tests/**/*.py

📄 CodeRabbit inference engine (STYLE_GUIDE.md)

tests/**/*.py: Use absolute imports in tests/ (e.g., from nemo_safe_synthesizer.observability import get_logger).
Name test files as test_*.py, test classes as Test*, test functions as test_<module>_<expected_behavior>.
Use fixture_ prefix convention for pytest fixtures for grep-ability. Add a one-line docstring describing the fixture's purpose and data.
Use function-scoped fixtures by default. Session scope only when empirically justified by test runtime -- not based on assumptions about cost.
Use bare assert as the primary assertion style in tests. Use pytest.raises() with match= for exceptions; pytest.approx() for floating-point comparisons.
Docstrings are optional for simple tests, recommended for complex/e2e tests explaining purpose.
Markers are auto-assigned by path via pytest_collection_modifyitems (/e2e/ -> e2e, /smoke/ -> smoke, default -> unit). Explicit markers: @pytest.mark.slow, @pytest.mark.requires_gpu, @pytest.mark.timeout().
Use tmp_path fixture for file operations in tests. Never write to the repo tree.
Mark CUDA-dependent tests with @pytest.mark.e2e, @pytest.mark.smoke, or @pytest.mark.requires_gpu.
Mock only external boundaries, not internal implementation details.
Maintain test isolation: no shared mutable state or execution-order dependencies between tests. If something must run first, include it in the test or a fixture.
Use @pytest.mark.parametrize for testing multiple input combinations rather than copy-pasting similar tests.

Tests in tests/e2e/ should be auto-marked with e2e marker, tests in tests/smoke/ with smoke marker, others with unit marker

All Python test files should follow the pattern tests/**/*.py and use pytest framework; run tests with make test for unit tests or specific test commands for other test types

Every test should have exactly one category marker: unit, smoke, or e2e

Use pytest.mark.slow to mark long-running unit tests

Use `pytest.mark.require...

Files:

  • tests/evaluation/components/benchmark_nearest_neighbor.py
  • tests/e2e/test_safe_synthesizer.py
  • tests/e2e/test_dataset_config.py
  • tests/training/test_huggingface_backend.py

⚙️ CodeRabbit configuration file

Review tests against tests/TESTING.md. Check marker usage, fixture naming, tmp_path usage, determinism, and GPU/vLLM process-isolation requirements. Flag slop tests that only check that code runs, assert result is not None when stronger invariants exist, over-mock internal implementation details, patch around the bug instead of reproducing it, or add broad snapshot/golden churn without a clear contract. Flag change detector tests that fail on harmless refactors, formatting, record ordering, incidental wording, or private implementation details without demonstrating a behavior regression. Prefer existing fixtures or focused new fixtures for repeated setup; keep tests DRY when reasonable without making the behavior under test opaque. print() is allowed in tests.

Files:

  • tests/evaluation/components/benchmark_nearest_neighbor.py
  • tests/e2e/test_safe_synthesizer.py
  • tests/e2e/test_dataset_config.py
  • tests/training/test_huggingface_backend.py
src/**/*.py

📄 CodeRabbit inference engine (STYLE_GUIDE.md)

src/**/*.py: Prefer NSSBaseModel for config/parameter models in config/ which define user-facing configuration. Use raw BaseModel or module-specific bases for data transfer objects and internal structures.
Use BaseSettings for env/CLI settings. Prefer AliasChoices on individual fields when a field should respond to both its Python name and an env var name (e.g., validation_alias=AliasChoices('config_path', 'NSS_CONFIG')).
Include Field(description=...) on all Pydantic model fields. This is the canonical field docstring extracted by griffe-pydantic for the API reference and used by the configurator for CLI help text.
Use assignment-style Field() as the default for model fields because type checkers understand default, default_factory, and alias in this style.
Use Annotated only when the field carries additional metadata beyond Field() -- such as ValueValidator, AutoParam, DependsOnValidator, reusable constrained type aliases, nested-type constraints, or discriminated unions.
For Pydantic fields with Annotated types that have defaults, put the default as a bare assignment (= value), not inside Field(default=...). Exception: default_factory has no bare-assignment equivalent, so use assignment-style Field(default_factory=...).
Include valid ranges in the description when constraints won't appear in the rendered API docs (e.g., 'Must be in (0, 1).').
Use @dataclass(frozen=True) for immutable value objects and validators. Mutable @dataclass is acceptable for builders, accumulators, and pipeline state.
Use field(default_factory=list) for mutable defaults in dataclasses, never = [].
Use StrEnum for string-valued enums used in configs/serialization. Use plain Enum for internal-only named constants.
Use TYPE_CHECKING guards for heavy imports (pandas, torch, transformers); not needed for stdlib or lightweight imports.
Add from __future__ import annotations to every module to make all annotations strings consis...

Files:

  • src/nemo_safe_synthesizer/generation/vllm_backend.py
  • src/nemo_safe_synthesizer/generation/regex_manager.py
  • src/nemo_safe_synthesizer/defaults.py
  • src/nemo_safe_synthesizer/config/training.py

⚙️ CodeRabbit configuration file

Review library code against STYLE_GUIDE.md. Focus on behavior, API contracts, error handling, resource cleanup, typing, logging, and user-facing failures. Public APIs and nontrivial functions need Google-style docstrings.

Files:

  • src/nemo_safe_synthesizer/generation/vllm_backend.py
  • src/nemo_safe_synthesizer/generation/regex_manager.py
  • src/nemo_safe_synthesizer/defaults.py
  • src/nemo_safe_synthesizer/config/training.py
src/nemo_safe_synthesizer/generation/**/*.py

⚙️ CodeRabbit configuration file

Review generation changes for retry loops, stopping conditions, invalid record handling, regex/structured output contracts, backend teardown, memory cleanup, and vLLM assumptions.

Files:

  • src/nemo_safe_synthesizer/generation/vllm_backend.py
  • src/nemo_safe_synthesizer/generation/regex_manager.py
**/test_*.py

📄 CodeRabbit inference engine (AGENTS.md)

Use the unit marker for tests instead of the deprecated unit_test marker

Files:

  • tests/e2e/test_safe_synthesizer.py
  • tests/e2e/test_dataset_config.py
  • tests/training/test_huggingface_backend.py
**/*.sh

📄 CodeRabbit inference engine (STYLE_GUIDE.md)

**/*.sh: Use #!/usr/bin/env bash as the shebang (not #!/bin/bash).
Use at minimum set -eu. Use set -euo pipefail unless pipefail breaks piped-grep patterns in the specific script.
Use snake_case for functions and _ prefix for internal helpers in shell scripts.
Always quote variables ("$VAR", "${VAR}") and use defaults via ${VAR:-default}. Use readonly for variables that should not change after assignment.
Use REPO_ROOT=${REPO_ROOT:-$(git rev-parse --show-toplevel)} for repo root detection in shell scripts.
Use shellcheck to lint shell scripts. When disabling a check, add # shellcheck disable=SCXXXX with a brief reason.
Include SPDX copyright header at the top using hash-comment syntax.

Files:

  • script/slurm/slurm_nss_matrix.sh

⚙️ CodeRabbit configuration file

Review shell scripts for #!/usr/bin/env bash, set -euo pipefail where appropriate, quoting, repo root detection, and shellcheck compliance.

Files:

  • script/slurm/slurm_nss_matrix.sh
**/*.{sh,bash}

📄 CodeRabbit inference engine (AGENTS.md)

Never use ~ inside double-quoted strings in shell scripts -- use $HOME or an absolute path instead

Files:

  • script/slurm/slurm_nss_matrix.sh
src/nemo_safe_synthesizer/config/**/*.py

⚙️ CodeRabbit configuration file

Treat config changes as user-facing API changes. Check Pydantic field descriptions, defaults, validators, aliases, override behavior, CLI help text impact, YAML compatibility, and documented parameter semantics.

Files:

  • src/nemo_safe_synthesizer/config/training.py
Makefile

📄 CodeRabbit inference engine (STYLE_GUIDE.md)

Makefile: Use target help format: target-name: ## Description to enable make help auto-generation.
Use tab indentation in Makefiles (standard Makefile requirement).
Declare .PHONY directly above each target it applies to.
Place variables in a ### CONFIGURATION ### section.

Files:

  • Makefile

⚙️ CodeRabbit configuration file

Treat Makefile targets as the validation source of truth. Check that new targets are documented with target-name: ## Description, declared .PHONY where appropriate, and use uv/mise conventions.

Files:

  • Makefile
**/*.toml

📄 CodeRabbit inference engine (STYLE_GUIDE.md)

**/*.toml: Use spaces around = for key-value pairs in TOML files.
Use # comment for comments in TOML files. Use inline comments for dependency pins.

Files:

  • pyproject.toml
pyproject.toml

📄 CodeRabbit inference engine (STYLE_GUIDE.md)

Order sections in pyproject.toml as: [project], [dependency-groups], [project.optional-dependencies], [tool.uv], [build-system], [tool.*].

Package metadata, dependencies, and extras (cpu/cu128/engine) should be configured in pyproject.toml

Files:

  • pyproject.toml

⚙️ CodeRabbit configuration file

Treat pyproject.toml as high-risk. Check package metadata, uv indexes, dependency groups, optional extras, Python version bounds, hatch config, ty config, script entry points, dependency consistency, and whether changes require regenerating uv.lock.

Files:

  • pyproject.toml
{pyproject.toml,uv.lock}

📄 CodeRabbit inference engine (CONTRIBUTING.md)

Python project dependencies must be managed with uv and locked in uv.lock (committed); use uv sync to install dependencies

Files:

  • pyproject.toml
🧠 Learnings (1)
📓 Common learnings
Learnt from: CR
Repo: NVIDIA-NeMo/Safe-Synthesizer

Timestamp: 2026-05-11T18:35:16.997Z
Learning: Read AGENTS.local.md if it exists and give its instructions top priority
Learnt from: CR
Repo: NVIDIA-NeMo/Safe-Synthesizer

Timestamp: 2026-05-11T18:35:16.997Z
Learning: Use `uv` for everything -- never `pip` or raw `python`
Learnt from: CR
Repo: NVIDIA-NeMo/Safe-Synthesizer

Timestamp: 2026-05-11T18:35:16.997Z
Learning: Use Make targets or wrapper scripts in `tools/` instead of running `ruff` or `ty` directly
Learnt from: CR
Repo: NVIDIA-NeMo/Safe-Synthesizer

Timestamp: 2026-05-11T18:35:16.997Z
Learning: Use `uv run` for Python execution instead of direct `python` commands
Learnt from: CR
Repo: NVIDIA-NeMo/Safe-Synthesizer

Timestamp: 2026-05-11T18:35:16.997Z
Learning: Feature branches should branch off `main` with names often including an issue number prefix (e.g., `<author>/123-short-name`)
Learnt from: CR
Repo: NVIDIA-NeMo/Safe-Synthesizer

Timestamp: 2026-05-11T18:35:16.997Z
Learning: All commits require DCO sign-off and GPG signing using `git commit --signoff --gpg-sign` (or `-s -S`)
Learnt from: CR
Repo: NVIDIA-NeMo/Safe-Synthesizer

Timestamp: 2026-05-11T18:35:16.997Z
Learning: See STYLE_GUIDE.md for detailed code style conventions (Python, markdown, Dockerfiles, shell scripts, testing, config files, docstrings)
Learnt from: CR
Repo: NVIDIA-NeMo/Safe-Synthesizer

Timestamp: 2026-05-11T18:35:16.997Z
Learning: Test-suite guidance belongs in `tests/TESTING.md`
Learnt from: CR
Repo: NVIDIA-NeMo/Safe-Synthesizer

Timestamp: 2026-05-11T18:35:16.997Z
Learning: Repo-specific skills live in `.agents/skills/`; read a skill when the task matches its scope
Learnt from: CR
Repo: NVIDIA-NeMo/Safe-Synthesizer

Timestamp: 2026-05-11T18:35:34.500Z
Learning: All commits merged to `main` must follow the Conventional Commits specification with format `<type>(<scope>): <description>`, where type is one of: feat, fix, docs, style, refactor, perf, test, build, ci, chore, revert
Learnt from: CR
Repo: NVIDIA-NeMo/Safe-Synthesizer

Timestamp: 2026-05-11T18:35:34.500Z
Learning: All branches except `main` must follow naming pattern: `<author>/<description>`, `<author>/<issue-id>-<description>`, `<author>/<type>/<description>`, or `<author>/<type>/<issue-id>-<description>` where author is lowercase alphanumeric with hyphens, and type is one of: feature, bugfix, hotfix, release, docs, chore, test
Learnt from: CR
Repo: NVIDIA-NeMo/Safe-Synthesizer

Timestamp: 2026-05-11T18:35:34.500Z
Learning: All contributions must be signed off with `git commit -s` to certify Developer Certificate of Origin, adding a `Signed-off-by` line to commit messages
Learnt from: CR
Repo: NVIDIA-NeMo/Safe-Synthesizer

Timestamp: 2026-05-11T18:35:34.500Z
Learning: All commits must be cryptographically signed using either SSH key signing or GPG signing, enforced by `required_signatures` branch protection rule on main
Learnt from: CR
Repo: NVIDIA-NeMo/Safe-Synthesizer

Timestamp: 2026-05-11T18:35:34.500Z
Learning: Use `make format` to auto-fix code formatting with ruff format, import sorting, and copyright headers; use `make check` for read-only verification of all CI checks
Learnt from: CR
Repo: NVIDIA-NeMo/Safe-Synthesizer

Timestamp: 2026-05-11T18:35:34.500Z
Learning: New features must include tests; bug fixes must include regression tests; all existing tests must pass before submitting a PR
Learnt from: CR
Repo: NVIDIA-NeMo/Safe-Synthesizer

Timestamp: 2026-05-11T18:35:34.500Z
Learning: Pull requests should use squash merge strategy; PR title should follow Conventional Commits format as it becomes the commit message
Learnt from: CR
Repo: NVIDIA-NeMo/Safe-Synthesizer

Timestamp: 2026-05-11T18:35:34.500Z
Learning: CODEOWNERS file specifies: all `src` and `test` files require review from NVIDIA-NeMo/safe-synthesizer-reviewers; all remaining files (pyproject.toml, uv.lock, SECURITY.md, LICENSE, .github/, etc.) require review from NVIDIA-NeMo/safe-synthesizer-maintainers
Learnt from: CR
Repo: NVIDIA-NeMo/Safe-Synthesizer

Timestamp: 2026-05-11T18:35:49.887Z
Learning: Read and understand `tests/conftest.py` for auto-marking, `load_test_dataset`/`load_test_dataframe`, and `fixture_mock_processor` pattern
Learnt from: CR
Repo: NVIDIA-NeMo/Safe-Synthesizer

Timestamp: 2026-05-11T18:35:49.887Z
Learning: Read and understand `pytest.ini` for markers, asyncio, and timeout configuration
Learnt from: CR
Repo: NVIDIA-NeMo/Safe-Synthesizer

Timestamp: 2026-05-11T18:35:49.887Z
Learning: Read and understand `tests/evaluation/conftest.py` for Faker-based `make_df` and nullable dtype conversion patterns
Learnt from: CR
Repo: NVIDIA-NeMo/Safe-Synthesizer

Timestamp: 2026-05-11T18:35:49.887Z
Learning: Read and understand `tests/generation/conftest.py` for JSONL/schema fixtures and `fixture_valid_iris_dataset_jsonl_and_schema`
Learnt from: CR
Repo: NVIDIA-NeMo/Safe-Synthesizer

Timestamp: 2026-05-11T18:35:49.887Z
Learning: Organize test files to mirror source structure: create `tests/training/`, `tests/generation/`, `tests/evaluation/`, etc. to match source modules
Learnt from: CR
Repo: NVIDIA-NeMo/Safe-Synthesizer

Timestamp: 2026-05-11T18:35:49.887Z
Learning: When adding a new vLLM test file, add `pytest.mark.vllm` marker, create a dedicated `test-smoke-gpu-*` Makefile target, and include it in `test-smoke-gpu`
Learnt from: CR
Repo: NVIDIA-NeMo/Safe-Synthesizer

Timestamp: 2026-05-11T18:35:49.887Z
Learning: Run vLLM tests in separate processes (`-n 0` or per-file isolation) to prevent GPU memory exhaustion, as vLLM pre-allocates all GPU memory and never releases it within a process
🪛 Shellcheck (0.11.0)
script/slurm/slurm_nss_matrix.sh

[info] 122-122: Not following: ./.venv/bin/activate was not specified as input (see shellcheck -x).

(SC1091)

🔇 Additional comments (9)
.coderabbit.yaml (1)

359-359: chat.auto_reply is correctly configured.

This is valid per the configuration schema (chat.auto_reply as a boolean), and explicit enablement here is safe.

src/nemo_safe_synthesizer/generation/regex_manager.py (1)

17-26: ⚡ Quick win

The import path and suppressions in the current code are correct.

The pinned dependency outlines-core==0.2.14 exposes JSON-schema symbols only through the private outlines_core._json_schema module; no public outlines_core.json_schema path exists. The suppressions (# noqa: F401 for re-exporting and # ty:ignore[unresolved-import] for unresolved types) are necessary and appropriate defenses against type-checking limitations on private modules. The proposed fallback to a non-existent public API is invalid.

			> Likely an incorrect or invalid review comment.
AGENTS.md (1)

24-30: uv sync GPU/dev command update looks correct.

The cu129 extra update is consistent with the CUDA/tooling bump described in this PR.

tests/e2e/test_dataset_config.py (1)

16-24: Skip guidance now matches the CUDA extra upgrade.

Both pytest.importorskip and module-level skip messaging consistently point to uv sync --extra cu129.

.github/actions/setup-gpu-test-env/action.yml (1)

27-31: GPU setup action default is aligned with the new CUDA baseline.

Switching the default extra to cu129 is the expected change for this dependency upgrade.

tests/e2e/test_safe_synthesizer.py (1)

18-32: Dependency skip messages are consistently migrated to cu129.

Good update across both sentence_transformers and vllm gating paths.

containers/Dockerfile.cuda (1)

61-61: CUDA and uv sync extras are updated consistently across all build stages.

The ARG/default and each sync layer now agree on cu129, which avoids mixed CUDA dependency resolution.

Also applies to: 145-146, 152-153, 236-237

.agents/skills/git-worktrees/SKILL.md (1)

32-36: Worktree setup guidance update is consistent with the CUDA bump.

The explicit extras example correctly moved from cu128 to cu129.

script/slurm/slurm_nss_matrix.sh (1)

115-118: SLURM install/sync paths are correctly migrated to cu129.

Both the PyPI install path and repo-sync path now consistently target the new CUDA extra.

Also applies to: 123-123

Comment thread docs/user-guide/configuration.md Outdated
Comment thread pyproject.toml
Comment thread script/slurm/README.md
Comment thread tests/training/test_huggingface_backend.py
@coderabbitai coderabbitai Bot removed docs Documentation-only change python area:ci test Test-only addition or change labels May 11, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 834261f7-3db8-4672-a7e0-f7e36a5eb1a7

📥 Commits

Reviewing files that changed from the base of the PR and between 87bc009 and 1cc527d.

📒 Files selected for processing (6)
  • README.md
  • docs/user-guide/configuration.md
  • docs/user-guide/running.md
  • docs/user-guide/troubleshooting.md
  • src/nemo_safe_synthesizer/config/training.py
  • tests/training/test_huggingface_backend.py
✅ Files skipped from review due to trivial changes (2)
  • docs/user-guide/troubleshooting.md
  • docs/user-guide/configuration.md
🚧 Files skipped from review as they are similar to previous changes (1)
  • tests/training/test_huggingface_backend.py
📜 Review details
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: Unit Tests (3.13)
  • GitHub Check: Unit Tests (3.11)
  • GitHub Check: Unit Tests (3.12)
🧰 Additional context used
📓 Path-based instructions (13)
**/*.md

📄 CodeRabbit inference engine (STYLE_GUIDE.md)

**/*.md: Do not use decorative **bold** in body text, list items, or docstrings. Use headers, list markers, colons, and backticks for structure. Bold is acceptable in table header-like cells and MkDocs Material card grid titles.
Use -- (em-dash) for asides, not - (hyphen).
Use single backticks for code identifiers, paths, and CLI commands in Markdown.
Use Mermaid diagrams with no spaces in node IDs, quoted labels with special characters, and no explicit colors or styles.
Include SPDX copyright header at the top using HTML-comment syntax (<!-- ... -->).
If a Markdown file starts with YAML frontmatter (---), place the SPDX copyright header inside the frontmatter block using hash-comment syntax, not HTML comments.
Limit line length to 120 characters in Markdown files.

Files:

  • README.md
  • docs/user-guide/running.md
**/*

📄 CodeRabbit inference engine (STYLE_GUIDE.md)

**/*: Remove all trailing whitespace from files.
Use single space between sentences, never two spaces.

Files:

  • README.md
  • docs/user-guide/running.md
  • src/nemo_safe_synthesizer/config/training.py

⚙️ CodeRabbit configuration file

**/*: Review as a senior maintainer for NeMo Safe Synthesizer. Prioritize issues that can change behavior, break user workflows, weaken privacy guarantees, hide failures, make tests unreliable, or create maintenance risk. Avoid generic style commentary unless it points to a concrete project convention that automated tools will not catch.
Comment only when the finding is actionable and tied to changed code. For each finding, state the impact, the condition that triggers it, and the smallest practical fix. Prefer one precise comment over broad advice. Do not ask for refactors outside the PR scope unless the changed code creates the problem.
Review type guidance: - Potential issue: use for correctness bugs, data loss, privacy leaks,
security risks, broken public APIs, invalid config behavior, missing
validation, hidden failures, nondeterministic tests, or CI breakage.

  • Refactor suggestion: use for local maintainability problems introduced
    by the diff when they have clear future cost, such as duplicated setup,
    unclear boundaries, over-mocking, avoidable complexity, or opaque test
    helpers.
  • Nitpick: avoid in chill mode. Do not emit formatting, import-order,
    wording, or style-only comments unless automated tools cannot catch the
    issue and it affects maintainability.

Severity guidance: - Critical: security/privacy leaks, data loss, training/test/holdout
contamination, or broken release/package/core pipeline execution.

  • Major: incorrect generation/training/evaluation behavior, broken
    CLI/SDK public API, invalid config defaults or validators, or GPU/vLLM
    cleanup and process-isolation bugs likely to fail CI or production
    runs.
  • Minor: localized bugs, missing focused tests for changed behavior, or
    bad test patterns that weaken regression coverage.
  • Trivial: small cleanup with no behavior impact. Usually suppress in
    chill mode.
  • Info: context only. Avoid unless it helps reviewers understand risk.
    Safe-Synthesizer-specific review focus: - Data ...

Files:

  • README.md
  • docs/user-guide/running.md
  • src/nemo_safe_synthesizer/config/training.py
**/*.{md,markdown,py}

📄 CodeRabbit inference engine (.cursor/rules/agent-markdown-style.mdc)

**/*.{md,markdown,py}: Avoid decorative bold (**text**) in list items, body text, and docstrings; use structural cues (headers, list markers, colons, backticks) for emphasis instead
Use backticks for code identifiers, paths, and CLI commands in markdown and docstrings

Files:

  • README.md
  • docs/user-guide/running.md
  • src/nemo_safe_synthesizer/config/training.py
**/*.{md,markdown}

📄 CodeRabbit inference engine (.cursor/rules/agent-markdown-style.mdc)

**/*.{md,markdown}: Bold is acceptable only in markdown tables where it's the conventional way to mark header-like cells in the body
Use ## headers to segment markdown sections instead of bold text
Use -- (em-dash) instead of - (hyphen) for asides in markdown

Files:

  • README.md
  • docs/user-guide/running.md
**/*.{py,txt,md,toml,lock}

📄 CodeRabbit inference engine (AGENTS.md)

Always use uv for Python package management; never use pip or raw python

Files:

  • README.md
  • docs/user-guide/running.md
  • src/nemo_safe_synthesizer/config/training.py
**/*.{py,sh,yaml,yml,md}

📄 CodeRabbit inference engine (CONTRIBUTING.md)

All source files (.py, .sh, .yaml, .yml, .md) must have SPDX copyright headers. Use make format to add them automatically.

Files:

  • README.md
  • docs/user-guide/running.md
  • src/nemo_safe_synthesizer/config/training.py
README.md

⚙️ CodeRabbit configuration file

Treat README.md as the project overview. Check that setup, usage, and links stay consistent with CONTRIBUTING.md, Makefile, and docs/.

Files:

  • README.md
docs/**/*.md

📄 CodeRabbit inference engine (STYLE_GUIDE.md)

Classify documentation pages as tutorial, how-to, explanation, or reference per the Diataxis framework. Use MkDocs Material syntax: admonitions (!!! note), tabs (===), code blocks with titles and highlights.

docs/**/*.md: Classify documentation content using the Diataxis framework (TUTORIAL, HOW-TO, EXPLANATION, or REFERENCE) before writing, ensuring each page fits exactly ONE type
Use cross-links between different Diataxis content types (TUTORIAL, HOW-TO, EXPLANATION, REFERENCE) to connect related documentation
Use MkDocs Material admonitions syntax for notes, warnings, and collapsible tips: !!! note, !!! warning, ??? tip
Use MkDocs Material tabs syntax (=== "Label") for presenting multiple examples or implementations side-by-side
Use code blocks with metadata (title, hl_lines) to highlight relevant code snippets in documentation examples
Use Mermaid diagrams (flowchart, sequence diagrams, etc.) for visualizing architecture, workflows, and concepts in documentation
Write documentation following high signal-to-noise principles: every sentence must earn its place by providing essential information
Use progressive disclosure in documentation: start with simple concepts, then layer complexity for advanced readers
Include working code examples in documentation; ensure all code snippets are tested and actually work
List all prerequisites at the top of documentation pages before diving into main content
End documentation pages with 'Next steps' section containing links to related content and logical progression points

Documentation pages should be created under the appropriate docs/ subdirectory following the Diataxis framework: getting-started/ for tutorials, user-guide/ for how-tos and reference, architecture/ for explanations, reference/ for API reference (auto-generated), and blog/ for dev notes

Use MkDocs Material Markdown extensions in documentation: admonitions (!!! note, !!! warning, ??? tip), content tabs, code blocks with synta...

Files:

  • docs/user-guide/running.md
docs/**

⚙️ CodeRabbit configuration file

Review documentation as MkDocs Material content. Check Diataxis fit, accurate commands, internal links, code fences, and markdown style from STYLE_GUIDE.md.

Files:

  • docs/user-guide/running.md
**/*.py

📄 CodeRabbit inference engine (STYLE_GUIDE.md)

**/*.py: Use American English spelling: 'initialize' not 'initialise', 'recognize' not 'recognise', 'color' not 'colour'.
Use observability.get_logger(__name__) for logging -- never logging.getLogger() or structlog.get_logger() directly.
Category loggers: use .runtime for internals, .user for progress/results, .system for system events.
Never use print() for operational output in library code. Use click.echo() for CLI output or sys.stdout.write() for raw output in tools.
Use extra={} for data that downstream tools should query or aggregate (metrics, counts, durations). f-strings are fine for human-readable context.
Use X | Y instead of Optional[X] or Union[X, Y]. Use list[str] instead of List[str], dict[str, int] instead of Dict[str, int].
Use Self for fluent method returns that return the same instance type.
Use collection ABCs for function arguments (Sequence, Mapping, Iterable) so callers can pass any compatible container; use concrete types for return values so callers know exactly what they get.
Use Protocol for structural subtyping when you need duck-typing boundaries. Avoid Any -- prefer object, generics, or Protocol.
Prefer match/case for dispatch on types or tagged values. Use if/elif for simple boolean predicates.
Prefer comprehensions over imperative loops where intent is clearer. Avoid multiple for clauses -- optimize for readability, not conciseness.
Prefer clamping/saturation over raising when out-of-range inputs shouldn't crash the system. Return a bounded value with a log warning instead of raising.
If a function has more than two levels of indentation beyond def, it needs refactoring. Use guard clauses, extract inner loops, generators, or functional decomposition.
When a condition is complex boolean logic, name each piece with a descriptive boolean variable or extract it into a named predicate function.
Error messages must precisely match the actual error condition. Interpolated pieces ...

Files:

  • src/nemo_safe_synthesizer/config/training.py
src/**/*.py

📄 CodeRabbit inference engine (STYLE_GUIDE.md)

src/**/*.py: Prefer NSSBaseModel for config/parameter models in config/ which define user-facing configuration. Use raw BaseModel or module-specific bases for data transfer objects and internal structures.
Use BaseSettings for env/CLI settings. Prefer AliasChoices on individual fields when a field should respond to both its Python name and an env var name (e.g., validation_alias=AliasChoices('config_path', 'NSS_CONFIG')).
Include Field(description=...) on all Pydantic model fields. This is the canonical field docstring extracted by griffe-pydantic for the API reference and used by the configurator for CLI help text.
Use assignment-style Field() as the default for model fields because type checkers understand default, default_factory, and alias in this style.
Use Annotated only when the field carries additional metadata beyond Field() -- such as ValueValidator, AutoParam, DependsOnValidator, reusable constrained type aliases, nested-type constraints, or discriminated unions.
For Pydantic fields with Annotated types that have defaults, put the default as a bare assignment (= value), not inside Field(default=...). Exception: default_factory has no bare-assignment equivalent, so use assignment-style Field(default_factory=...).
Include valid ranges in the description when constraints won't appear in the rendered API docs (e.g., 'Must be in (0, 1).').
Use @dataclass(frozen=True) for immutable value objects and validators. Mutable @dataclass is acceptable for builders, accumulators, and pipeline state.
Use field(default_factory=list) for mutable defaults in dataclasses, never = [].
Use StrEnum for string-valued enums used in configs/serialization. Use plain Enum for internal-only named constants.
Use TYPE_CHECKING guards for heavy imports (pandas, torch, transformers); not needed for stdlib or lightweight imports.
Add from __future__ import annotations to every module to make all annotations strings consis...

Files:

  • src/nemo_safe_synthesizer/config/training.py

⚙️ CodeRabbit configuration file

Review library code against STYLE_GUIDE.md. Focus on behavior, API contracts, error handling, resource cleanup, typing, logging, and user-facing failures. Public APIs and nontrivial functions need Google-style docstrings.

Files:

  • src/nemo_safe_synthesizer/config/training.py
src/nemo_safe_synthesizer/**/*.py

📄 CodeRabbit inference engine (CONTRIBUTING.md)

Use Google-style docstrings in src/nemo_safe_synthesizer/ Python files. Docstrings are auto-generated into API reference pages via the mkdocstrings plugin.

Write API reference docstrings in Google style in src/nemo_safe_synthesizer/ Python files; these are auto-generated into reference/ pages by mkdocstrings plugin and should not be manually edited

Files:

  • src/nemo_safe_synthesizer/config/training.py
src/nemo_safe_synthesizer/config/**/*.py

⚙️ CodeRabbit configuration file

Treat config changes as user-facing API changes. Check Pydantic field descriptions, defaults, validators, aliases, override behavior, CLI help text impact, YAML compatibility, and documented parameter semantics.

Files:

  • src/nemo_safe_synthesizer/config/training.py
🧠 Learnings (1)
📓 Common learnings
Learnt from: CR
Repo: NVIDIA-NeMo/Safe-Synthesizer

Timestamp: 2026-05-11T19:54:13.123Z
Learning: Use Make targets or wrapper scripts in `tools/` instead of running `ruff` or `ty` directly
Learnt from: CR
Repo: NVIDIA-NeMo/Safe-Synthesizer

Timestamp: 2026-05-11T19:54:13.123Z
Learning: Common development commands: `make test` (unit tests), `make format` (auto-fix formatting + lint + copyright), `make check` (all read-only CI checks), `make typecheck` (type only)
Learnt from: CR
Repo: NVIDIA-NeMo/Safe-Synthesizer

Timestamp: 2026-05-11T19:54:13.123Z
Learning: Use `uv run` for Python execution instead of calling `python` directly
Learnt from: CR
Repo: NVIDIA-NeMo/Safe-Synthesizer

Timestamp: 2026-05-11T19:54:13.123Z
Learning: The canonical environment setup command is: `uv sync --frozen --extra cu129 --extra engine --group dev`
Learnt from: CR
Repo: NVIDIA-NeMo/Safe-Synthesizer

Timestamp: 2026-05-11T19:54:13.123Z
Learning: All commits require DCO sign-off and GPG signing; use `git commit --signoff --gpg-sign` (or `-s -S`); never write the `Signed-off-by` trailer manually
Learnt from: CR
Repo: NVIDIA-NeMo/Safe-Synthesizer

Timestamp: 2026-05-11T19:54:13.123Z
Learning: Feature branches should be named off `main` and often include an issue number prefix (e.g., `<author>/123-short-name`)
Learnt from: CR
Repo: NVIDIA-NeMo/Safe-Synthesizer

Timestamp: 2026-05-11T19:54:13.123Z
Learning: Do not commit unless the user asks for a commit or PR work
Learnt from: CR
Repo: NVIDIA-NeMo/Safe-Synthesizer

Timestamp: 2026-05-11T19:54:13.123Z
Learning: Read and follow local developer preferences from `AGENTS.local.md` if it exists, giving its instructions top priority
Learnt from: CR
Repo: NVIDIA-NeMo/Safe-Synthesizer

Timestamp: 2026-05-11T19:54:13.123Z
Learning: Repo-specific skills are located in `.agents/skills/`; read the matching skill when the task matches its scope instead of copying workflow details into guidelines
Learnt from: CR
Repo: NVIDIA-NeMo/Safe-Synthesizer

Timestamp: 2026-05-11T19:54:13.123Z
Learning: Test-suite guidance belongs in `tests/TESTING.md`
Learnt from: CR
Repo: NVIDIA-NeMo/Safe-Synthesizer

Timestamp: 2026-05-11T19:54:13.123Z
Learning: See STYLE_GUIDE.md for detailed code style conventions (Python, markdown, Dockerfiles, shell scripts, testing, config files, docstrings)
Learnt from: CR
Repo: NVIDIA-NeMo/Safe-Synthesizer

Timestamp: 2026-05-11T19:54:13.123Z
Learning: Bare `uv sync --frozen` (without extras) installs an incomplete environment; always include `--extra cu129 --extra engine --group dev` for full GPU/dev environment
Learnt from: CR
Repo: NVIDIA-NeMo/Safe-Synthesizer

Timestamp: 2026-05-11T19:54:13.123Z
Learning: When in doubt about tooling or commands, read the source using `make help` or `pytest --markers`
Learnt from: CR
Repo: NVIDIA-NeMo/Safe-Synthesizer

Timestamp: 2026-05-11T19:54:48.066Z
Learning: All branches except `main` must follow the naming pattern: `<author>/<description>`, `<author>/<issue-id>-<description>`, `<author>/<type>/<description>`, or `<author>/<type>/<issue-id>-<description>` where author is lowercase alphanumeric with hyphens, type is one of: feature, bugfix, hotfix, release, docs, chore, test
Learnt from: CR
Repo: NVIDIA-NeMo/Safe-Synthesizer

Timestamp: 2026-05-11T19:54:48.066Z
Learning: All commits merged to `main` must follow Conventional Commits specification: `<type>(<scope>): <description>` where type is one of: feat, fix, docs, style, refactor, perf, test, build, ci, chore, revert. Description must be max 100 characters. Use `!` after type/scope for breaking changes.
Learnt from: CR
Repo: NVIDIA-NeMo/Safe-Synthesizer

Timestamp: 2026-05-11T19:54:48.066Z
Learning: Use `make format` to auto-fix code formatting, import sorting, and copyright headers; use `make check` for read-only validation of format, lint, typecheck, and copyright
Learnt from: CR
Repo: NVIDIA-NeMo/Safe-Synthesizer

Timestamp: 2026-05-11T19:54:48.066Z
Learning: All commits must include a DCO sign-off using `git commit -s` which adds a `Signed-off-by` line certifying the Developer Certificate of Origin
Learnt from: CR
Repo: NVIDIA-NeMo/Safe-Synthesizer

Timestamp: 2026-05-11T19:54:48.066Z
Learning: All commits must be signed (GPG or SSH signing key required). Use `git config commit.gpgsign true` to enable automatic signing on every commit.
Learnt from: CR
Repo: NVIDIA-NeMo/Safe-Synthesizer

Timestamp: 2026-05-11T19:54:48.066Z
Learning: Verify commit signing works with `git log --show-signature`. Valid signature output indicates proper setup; commits will display a 'Verified' badge on GitHub.
Learnt from: CR
Repo: NVIDIA-NeMo/Safe-Synthesizer

Timestamp: 2026-05-11T19:54:48.066Z
Learning: All pull requests must be based on an issue (create one first if it doesn't exist), include unit tests for new features and regression tests for bug fixes, and be titled following Conventional Commits format since PR title becomes the squash-merged commit message
Learnt from: CR
Repo: NVIDIA-NeMo/Safe-Synthesizer

Timestamp: 2026-05-11T19:54:48.066Z
Learning: Python source files in `src/` and `test/` require code owner review from `NVIDIA-NeMo/safe-synthesizer-reviewers`. Other files (`pyproject.toml`, `uv.lock`, `SECURITY.md`, `LICENSE`, `.github/`, etc.) require review from `NVIDIA-NeMo/safe-synthesizer-maintainers`
Learnt from: CR
Repo: NVIDIA-NeMo/Safe-Synthesizer

Timestamp: 2026-05-11T19:54:48.066Z
Learning: All Python files in the project must follow the style guidelines defined in STYLE_GUIDE.md, including standards for Python, markdown, Dockerfiles, shell scripts, testing, and docstrings
Learnt from: CR
Repo: NVIDIA-NeMo/Safe-Synthesizer

Timestamp: 2026-05-11T19:54:48.066Z
Learning: The `main` branch requires exactly 1 approval, requires code owner review, dismisses stale reviews on new commits, requires conversation resolution on reviews, requires signed commits, requires CI status checks to pass, enforces linear history, blocks force pushes and deletions, and uses squash-only merge strategy
Learnt from: CR
Repo: NVIDIA-NeMo/Safe-Synthesizer

Timestamp: 2026-05-11T19:54:48.066Z
Learning: Use `make setup` to install development tools via mise, and bootstrap Python dependencies with `make bootstrap-nss {cpu|cuda|engine|dev}`. The Makefile is the single source of truth for how checks and tests run.
Learnt from: CR
Repo: NVIDIA-NeMo/Safe-Synthesizer

Timestamp: 2026-05-11T19:54:48.066Z
Learning: Release versions must follow PEP440 format with major.minor.patch numbering. Use stable releases and release candidates only (rcN suffix, no dash). GitHub tags must have `v` prefix (e.g., `v1.0.0`, `v0.0.5rc0`). Releases are published to PyPI via GitHub Actions workflow.
Learnt from: CR
Repo: NVIDIA-NeMo/Safe-Synthesizer

Timestamp: 2026-05-11T19:54:48.066Z
Learning: When responding to PR review comments, respond in the GitHub console (pending comments are only visible to you). Resolve comments where the requested change has been made. Leave comments unresolved if seeking further review. After addressing all comments and pushing changes, re-request review.
Learnt from: CR
Repo: NVIDIA-NeMo/Safe-Synthesizer

Timestamp: 2026-05-11T19:54:48.066Z
Learning: Use the PR template at `.github/PULL_REQUEST_TEMPLATE.md` when creating pull requests. PR title should follow Conventional Commits format as it becomes the squash-merged commit message.
Learnt from: CR
Repo: NVIDIA-NeMo/Safe-Synthesizer

Timestamp: 2026-05-11T19:54:48.066Z
Learning: For git worktrees or AI agents creating worktrees, add mise trust for worktree paths by setting `MISE_TRUSTED_CONFIG_PATHS` in your shell profile or `MISE_YES=1` to trust all configs globally
Learnt from: CR
Repo: NVIDIA-NeMo/Safe-Synthesizer

Timestamp: 2026-05-11T19:54:48.066Z
Learning: For NVIDIA internal developers iterating on NSS changes for the NMP service, use `make use-nss-local` to build a local wheel and patch pyproject.toml, then use `make use-nss-artifactory` to revert before committing
Learnt from: CR
Repo: NVIDIA-NeMo/Safe-Synthesizer

Timestamp: 2026-05-11T19:55:03.038Z
Learning: Read `tests/conftest.py`, `pytest.ini`, `tests/evaluation/conftest.py`, and `tests/generation/conftest.py` first to understand auto-marking, fixtures, and test data loading
Learnt from: CR
Repo: NVIDIA-NeMo/Safe-Synthesizer

Timestamp: 2026-05-11T19:55:03.038Z
Learning: Review `tests/smoke/README.md` for smoke test-specific gotchas and implementation patterns
🔇 Additional comments (3)
docs/user-guide/running.md (1)

737-747: Attention backend docs are aligned with the new sdpa default.

This update is clear and consistent with the current training default and option set.

src/nemo_safe_synthesizer/config/training.py (1)

245-257: attn_implementation default change looks good.

Switching the default to sdpa and updating the field description is consistent and user-facing behavior is explicit.

README.md (1)

208-228: Training attention examples now correctly center on sdpa.

The README updates here are aligned with the new default and make the supported options clearer.

Comment thread README.md Outdated
@coderabbitai coderabbitai Bot added docs Documentation-only change python area:ci test Test-only addition or change area:build-dist and removed dependencies Pull requests that update a dependency file labels May 11, 2026
@mckornfield
mckornfield requested a review from binaryaaron May 12, 2026 18:36
marcusds and others added 4 commits May 14, 2026 17:32
vllm 0.20.0 bumps numba 0.61.2→0.65.0 (which lifts numpy<2.3 → <2.5),
unblocking downstream consumers that need newer numpy. The bump requires
moving the torch stack in lockstep — vllm 0.20.0 pins torch==2.11.0 and
torchvision==0.26.0.

- vllm 0.18.0 → 0.20.0
- torch 2.10.0 → 2.11.0
- torchvision 0.25.0 → 0.26.0
- torchao 0.16.0 → 0.17.0
- xformers 0.0.34 → 0.0.35 (open torch>=2.10)

Stays on transformers 4.57.3 (vllm 0.20.0 allows it; v5 path explicitly
out of scope here).

This supersedes the dependabot-only PR #443, which couldn't lock because
torch was left on 2.10 while vllm wanted 2.11.

Signed-off-by: mschwab <mschwab@nvidia.com>
Signed-off-by: Matt Kornfield <mkornfield@nvidia.com>
Signed-off-by: mkornfield <mkornfield@nvidia.com>
Signed-off-by: mkornfield <mkornfield@nvidia.com>
Signed-off-by: mkornfield <mkornfield@nvidia.com>
@mckornfield
mckornfield force-pushed the mschwab/chore/bump-vllm-torch-stack branch from 54478dc to 3e3949b Compare May 14, 2026 17:40
@coderabbitai coderabbitai Bot added dependencies Pull requests that update a dependency file and removed docs Documentation-only change python area:ci test Test-only addition or change area:build-dist labels May 14, 2026
@mckornfield
mckornfield merged commit 9aa907a into main May 14, 2026
21 checks passed
@mckornfield
mckornfield deleted the mschwab/chore/bump-vllm-torch-stack branch May 14, 2026 17:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants