Skip to content

Conversation

@dagardner-nv
Copy link
Contributor

@dagardner-nv dagardner-nv commented Jan 22, 2026

Description

  • Fix a build issue for nvidia-nat-weave using Python 3.13, currently this package attempts to install blis v0.7.11, which does not contain a pre-built wheel and fails to compile.

By Submitting this PR I confirm:

  • I am familiar with the Contributing Guidelines.
  • We require that all contributors "sign-off" on their commits. This certifies that the contribution is your original work, or you have rights to submit it under the same license, or a compatible license.
    • Any contribution which contains commits that are not Signed-Off will not be accepted.
  • When the PR is ready for review, new or existing tests cover these changes.
  • When the PR is ready for review, the documentation is up to date with these changes.

Summary by CodeRabbit

  • Chores

    • CI now supports Python 3.11, 3.12, and 3.13 and will auto-install missing versions for multi-version stages.
    • Added automated wheel testing that builds, installs, and validates packages across each supported Python version using isolated environments.
  • Bug Fixes

    • Pinned a dependency to resolve build issues on Python 3.13.

✏️ Tip: You can customize this high-level summary in your review settings.

Signed-off-by: David Gardner <dagardner@nvidia.com>
Signed-off-by: David Gardner <dagardner@nvidia.com>
Signed-off-by: David Gardner <dagardner@nvidia.com>
Signed-off-by: David Gardner <dagardner@nvidia.com>
Signed-off-by: David Gardner <dagardner@nvidia.com>
Signed-off-by: David Gardner <dagardner@nvidia.com>
Signed-off-by: David Gardner <dagardner@nvidia.com>
Signed-off-by: David Gardner <dagardner@nvidia.com>
Signed-off-by: David Gardner <dagardner@nvidia.com>
Signed-off-by: David Gardner <dagardner@nvidia.com>
Signed-off-by: David Gardner <dagardner@nvidia.com>
Signed-off-by: David Gardner <dagardner@nvidia.com>
Signed-off-by: David Gardner <dagardner@nvidia.com>
Signed-off-by: David Gardner <dagardner@nvidia.com>
Signed-off-by: David Gardner <dagardner@nvidia.com>
Signed-off-by: David Gardner <dagardner@nvidia.com>
…olkit into david-post-build-wheel-test

Signed-off-by: David Gardner <dagardner@nvidia.com>
@dagardner-nv dagardner-nv requested a review from a team as a code owner January 22, 2026 21:03
@dagardner-nv dagardner-nv added improvement Improvement to existing functionality non-breaking Non-breaking change labels Jan 22, 2026
@dagardner-nv dagardner-nv self-assigned this Jan 22, 2026
@coderabbitai
Copy link

coderabbitai bot commented Jan 22, 2026

Warning

Rate limit exceeded

@dagardner-nv has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 12 minutes and 12 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

Walkthrough

Adds CI tooling to install and test multiple Python versions (3.11–3.13) per job, expands wheel build script to move and test wheels across those Python versions using per-version venvs, and pins blis~=1.3 in nvidia-nat-weave dependencies.

Changes

Cohort / File(s) Summary
CI Infrastructure – Python Version Management
ci/scripts/common.sh
Exports SUPPORTED_PYTHON_VERSIONS=("3.11" "3.12" "3.13") and adds install_python_versions() which detects current major.minor, skips it, checks for managed installs via uv python find --managed-python, and runs UV_PYTHON_DOWNLOADS="manual" uv python install --managed-python <version> to install missing versions.
CI Infrastructure – Wheel Building & Testing
ci/scripts/github/build_wheel.sh
Flattens built wheels into WHEELS_BASE_DIR, then for each moved wheel and each supported Python version: creates a uv venv, installs the wheel, verifies import nat and nat --version, handles errors with explicit exit codes, and ensures environment/temp cleanup.
Project Dependencies
packages/nvidia_nat_weave/pyproject.toml
Adds transitive dependency blis~=1.3 to project.dependencies (inserted near weave==0.52.22) to address Python 3.13 build compatibility.

Sequence Diagram

sequenceDiagram
    participant BuildScript as Build Script
    participant PythonMgr as UV Python Manager
    participant WheelDir as Wheels Directory
    participant VEnv as VirtualEnv/Test Runner

    BuildScript->>BuildScript: Build wheels
    BuildScript->>WheelDir: Move wheels to WHEELS_BASE_DIR
    BuildScript->>PythonMgr: install_python_versions()
    PythonMgr->>PythonMgr: detect current Python (major.minor)
    PythonMgr->>PythonMgr: for each supported version: uv python find --managed-python
    PythonMgr->>PythonMgr: if missing -> UV_PYTHON_DOWNLOADS="manual" uv python install --managed-python <version>
    BuildScript->>BuildScript: for each wheel
    BuildScript->>BuildScript: for each supported Python version
    BuildScript->>VEnv: create uv venv for version
    BuildScript->>VEnv: install wheel from WheelDir
    VEnv->>VEnv: python -c "import nat"
    VEnv->>VEnv: run nat --version
    VEnv-->>BuildScript: return success or error
    BuildScript->>VEnv: cleanup venv and temp dir
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: adding wheel installability testing to the build_wheel CI script, which is the primary objective of the PR.

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


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

Signed-off-by: David Gardner <dagardner@nvidia.com>
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Fix all issues with AI agents
In `@ci/scripts/github/build_wheel.sh`:
- Around line 99-103: Adjust the indentation of the conditional block that
checks IMPORT_TEST_RESULT to match the surrounding 8-space indentation style:
locate the if/then/fi block referencing IMPORT_TEST_RESULT, rapids-logger, echo
"${PYTHON_IMPORT_OUT}", and exit ${IMPORT_TEST_RESULT} (the lines using
variables whl and pyver) and change the current 7-space indent to 8 spaces so
the block aligns visually with the surrounding code.

In `@packages/nvidia_nat_weave/pyproject.toml`:
- Around line 30-33: The dependencies list in pyproject.toml contains a syntax
error: add a missing comma after the dependency string "blis~=1.3" so it is
properly separated from the next entry "fickling>=0.1.7,<1.0.0"; update the
dependencies array to include that comma and re-parse the TOML to confirm it
loads correctly.
🧹 Nitpick comments (1)
ci/scripts/common.sh (1)

227-251: LGTM! The function correctly provisions multiple Python versions.

The logic for checking existing installations and conditionally downloading is well-structured. The --managed-python flag usage is appropriately documented.

Minor shellcheck note (SC2155): Line 229 combines declaration and assignment which can mask return values. This is low risk here since awk is unlikely to fail on valid input, but separating them is a defensive practice:

local current_python_version
current_python_version=$(echo ${PYTHON_VERSION} | awk '{split($0, a, "."); print a[1]"."a[2]}')

Signed-off-by: David Gardner <dagardner@nvidia.com>
@dagardner-nv dagardner-nv requested a review from a team as a code owner January 22, 2026 21:07
Signed-off-by: David Gardner <dagardner@nvidia.com>
Copy link
Contributor

@mnajafian-nv mnajafian-nv left a comment

Choose a reason for hiding this comment

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

Approved with minor fixes suggested inline

Signed-off-by: David Gardner <dagardner@nvidia.com>
dagardner-nv and others added 5 commits January 22, 2026 14:07
Signed-off-by: David Gardner <dagardner@nvidia.com>
Co-authored-by: mnajafian-nv <mnajafian@nvidia.com>
Signed-off-by: David Gardner <96306125+dagardner-nv@users.noreply.github.com>
…/NeMo-Agent-Toolkit into david-post-build-wheel-test

Signed-off-by: David Gardner <dagardner@nvidia.com>
Co-authored-by: mnajafian-nv <mnajafian@nvidia.com>
Signed-off-by: David Gardner <96306125+dagardner-nv@users.noreply.github.com>
…/NeMo-Agent-Toolkit into david-post-build-wheel-test

Signed-off-by: David Gardner <dagardner@nvidia.com>
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@ci/scripts/github/build_wheel.sh`:
- Around line 56-62: When flattening wheels the current loop (variables
BUILT_WHEELS, MOVED_WHEELS, iterating for whl and computing dest_wheel_name then
mv) can silently overwrite if two wheels share the same basename; modify the
loop to check if dest_wheel_name already exists before moving, and if it does
log a clear error and exit non-zero (fail fast) instead of overwriting; on
success continue to mv and append to MOVED_WHEELS as before.
♻️ Duplicate comments (1)
ci/scripts/github/build_wheel.sh (1)

65-119: Ensure temp venv cleanup on failures (trap-based cleanup).
If a test fails mid-loop, TEMP_INSTALL_LOCATION can linger; a trap keeps CI clean.

🧹 Suggested cleanup hook
 TEMP_INSTALL_LOCATION="${WORKSPACE_TMP}/wheel_test_env"
 install_python_versions
+
+cleanup_test_env() {
+    if [[ -n "${TEMP_INSTALL_LOCATION}" && -d "${TEMP_INSTALL_LOCATION}" ]]; then
+        deactivate 2>/dev/null || true
+        rm -rf "${TEMP_INSTALL_LOCATION}" 2>/dev/null || true
+    fi
+}
+trap cleanup_test_env EXIT
🧹 Nitpick comments (1)
ci/scripts/common.sh (1)

227-251: Avoid masking return status when initializing current_python_version.
Shellcheck SC2155 recommends declaring and assigning separately; also makes the flow clearer. Line 229.

♻️ Proposed tweak
-   local current_python_version=$(echo ${PYTHON_VERSION} | awk '{split($0, a, "."); print a[1]"."a[2]}')
+   local current_python_version
+   current_python_version=$(echo "${PYTHON_VERSION}" | awk '{split($0, a, "."); print a[1]"."a[2]}')

…olkit into david-post-build-wheel-test

Signed-off-by: David Gardner <dagardner@nvidia.com>
@dagardner-nv
Copy link
Contributor Author

/merge

@rapids-bot rapids-bot bot merged commit 547373a into NVIDIA:release/1.4 Jan 22, 2026
17 checks passed
@dagardner-nv dagardner-nv deleted the david-post-build-wheel-test branch January 22, 2026 23:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

improvement Improvement to existing functionality non-breaking Non-breaking change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants