[None][fix] Install with the venv interpreter, not sys.executable - #18773
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 12 included reviews per hour; 5 remain after this review. WalkthroughThe build script now installs the editable package with the configured virtual-environment interpreter. The ChangesEditable package installation
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to The editable install path now targets the build virtual environment rather than the interpreter that launched the script, with focused coverage for that command selection. No concrete current-head merge-blocking risk remains. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
/bot run |
|
PR_Github #71784 [ run ] triggered by Bot. Commit: |
|
PR_Github #71784 [ run ] completed with state
|
|
/bot run |
|
PR_Github #71790 [ run ] triggered by Bot. Commit: |
|
PR_Github #71790 [ run ] completed with state
|
|
/bot run --disable-fail-fast |
|
PR_Github #71795 [ run ] triggered by Bot. Commit: |
|
PR_Github #71795 [ run ] completed with state
|
|
/bot run |
|
PR_Github #71803 [ run ] triggered by Bot. Commit: |
|
PR_Github #71803 [ run ] completed with state
|
|
/bot run |
|
PR_Github #71808 [ run ] triggered by Bot. Commit: |
|
PR_Github #71808 [ run ] completed with state
|
`build_wheel.py --install` ran `pip install -e .[devel]` with `sys.executable` rather than the `venv_python` that `setup_venv()` had just created. A fresh checkout has to start the script with the system interpreter, so the package landed in the system site-packages and the newly built venv was left without it. The `-m build` invocation a few lines earlier already uses `venv_python`, so this was an oversight rather than a choice. The call moves into a small helper so the interpreter choice can be covered by a unit test without running a build. Signed-off-by: Brian Nguyen <brnguyen@nvidia.com>
beb5941 to
45a4472
Compare
|
/bot run |
|
PR_Github #71837 [ run ] triggered by Bot. Commit: |
|
PR_Github #71837 [ run ] completed with state
|
|
/bot skip --comment "The 16 failures are unrelated infrastructure flakes, not caused by this change. This PR only switches the editable-install to the venv interpreter (scripts/build_wheel.py) and adds one unit test; if it were broken the build/install stages would fail and imports would break suite-wide. Instead both x86 and SBSA builds passed and 52074 tests passed with 0 regressions. The failures were confined to two of 208 x86 shards: DGX_H100-PyTorch-1 died on a UCX connection reset (Connection reset by remote peer) mid-test, and DGX_H100-PyTorch-3 died when Jenkins agent node cw-dfw-cs-001-login-02 went offline (ChannelClosedException, slurm job cancelled). Both are infra events on unrelated multimodal/accuracy tests; the PR-added test_build_wheel_install_interpreter.py passed. Skipping." |
|
PR_Github #71959 [ skip ] triggered by Bot. Commit: |
|
PR_Github #71959 [ skip ] completed with state |
Description
scripts/build_wheel.py --installranpip install -e .[devel]withsys.executablerather than thevenv_pythonthatsetup_venv()had just created. A fresh checkout has to startbuild_wheel.pywith the system interpreter, so the package landed in the system site-packages and the newly built venv was left without it.The
-m buildinvocation a few lines earlier already usesvenv_python, so this looks like an oversight rather than a deliberate choice.The call moves into a small
install_editable_package()helper, purely so the interpreter choice can be covered by a unit test without running a build.Split out of #18752, where it was an unrelated drive-by.
Test Coverage
tests/unittest/others/test_build_wheel_install_interpreter.py(new, 1 case, CPU-only, no subprocesses): patchesbuild_runand asserts the install command is issued with the venv interpreter and not withsys.executable.PR Checklist
Please review the following before submitting your PR:
PR description clearly explains what and why. If using CodeRabbit's summary, please make sure it makes sense.
PR Follows TRT-LLM CODING GUIDELINES to the best of your knowledge.
Test cases are provided for new code paths (see test instructions)
If PR introduces API changes, an appropriate PR label is added - either
api-compatibleorapi-breaking. Forapi-breaking, includeBREAKINGin the PR title.Any new dependencies have been scanned for license and vulnerabilities
CODEOWNERS updated if ownership changes
Documentation updated as needed
Update tava architecture diagram if there is a significant design change in PR.
The reviewers assigned automatically/manually are appropriate for the PR.
Please check this after reviewing the above items as appropriate for this PR.
GitHub Bot Help
To see a list of available CI bot commands, please comment
/bot help.Dev Engineer Review
install_editable_package(venv_python)now uses the virtual environment interpreter for editable installation.--installpath no longer installs into the system interpreter environment.QA Engineer Review
venv_pythonand notsys.executable.