Fix: use python3 in debugger server.sh#1590
Conversation
Containers without a `python` shim (only `python3`) caused `check_modelopt_local` in `tools/debugger/server.sh` to fail with `python: command not found`, aborting the server before it could verify the editable install. Switch the inline check and the fallback `pip install -e .[dev]` invocation to `python3` / `python3 -m pip` so the script works on python3-only images. Signed-off-by: Chenjie Luo <chenjiel@nvidia.com>
|
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 (1)
📝 WalkthroughWalkthroughThe debugger server shell script is updated to consistently use ChangesPython 3 consistency in debugger server script
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes 🚥 Pre-merge checks | ✅ 6✅ Passed checks (6 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
meenchen
left a comment
There was a problem hiding this comment.
Bot review — DM the bot to share feedback.
Trivial, correct fix: switches python → python3 and pip → python3 -m pip in tools/debugger/server.sh so the editable-install check works in containers that only ship python3. Internal debugger tooling, no tests warranted, fully backward-compatible.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1590 +/- ##
==========================================
- Coverage 73.22% 72.88% -0.35%
==========================================
Files 478 479 +1
Lines 52421 52735 +314
==========================================
+ Hits 38387 38436 +49
- Misses 14034 14299 +265
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
What does this PR do?
Type of change: Bug fix
tools/debugger/server.shinvokespython -c "..."insidecheck_modelopt_local(andpip install -e .[dev]in the fallback path). Containers that only shippython3(nopythonshim) cause the check to fail withpython: command not found, exit 127. The server interprets this as "modelopt not editable-installed", runspip install, the second check fails the same way, and the server aborts before it ever listens for commands.Switches both the inline import check and the install fallback to
python3/python3 -m pip.Usage
bash tools/debugger/server.sh # now starts cleanly on python3-only imagesTesting
Verified inside a container where
which pythonreturns nothing andpython3is/usr/bin/python3(Python 3.12). With the old script,server.shaborted atcheck_modelopt_local. With this fix, the check passes against an existing editable install and the server proceeds to wait for the client handshake.Before your PR is "Ready for review"
python3is present on every image that previously hadpython.CONTRIBUTING.md: N/ASummary by CodeRabbit