Skip to content

Commit d45219b

Browse files
authored
Fix debugger server failing to detect editable-installed modelopt (#1270)
## Summary - Removed `PYTHONPATH="" python -I` override in `check_modelopt_local()` so the PYTHONPATH validation uses the actual environment instead of an isolated one - Moved the workdir log line earlier in `server.sh` for better debugging visibility ## Test plan - [x] Start `server.sh` inside a Docker container and verify it correctly detects editable-installed modelopt - [x] Confirm the workdir is logged before the modelopt check runs 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Chores** * Server startup now displays the configured work directory earlier in the initialization process, providing improved visibility of the active directory during server launch. * Simplified the modelopt validation check during server initialization while maintaining the same validation behavior. <!-- end of auto-generated comment: release notes by coderabbit.ai --> Signed-off-by: Chenjie Luo <chenjiel@nvidia.com>
1 parent 07ae8e7 commit d45219b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tools/debugger/server.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@ fi
6161
CMD_DIR="$RELAY_DIR/cmd"
6262
RESULT_DIR="$RELAY_DIR/result"
6363

64+
echo "[server] Workdir: $WORKDIR"
65+
6466
cleanup() {
6567
echo "[server] Shutting down..."
6668
# Kill any running command (guard all reads with || true to prevent set -e
@@ -97,8 +99,7 @@ mkdir -p "$CMD_DIR" "$RESULT_DIR"
9799

98100
# Ensure modelopt is editable-installed from WORKDIR
99101
check_modelopt_local() {
100-
# Clear PYTHONPATH and use -I to validate actual install state, not source tree
101-
PYTHONPATH="" python -I -c "
102+
python -c "
102103
import modelopt, os, sys
103104
actual = os.path.realpath(modelopt.__path__[0])
104105
expected = os.path.realpath('$WORKDIR')
@@ -124,7 +125,6 @@ fi
124125
# Signal that server is ready
125126
echo "$(hostname):$$:$(date -Iseconds)" > "$RELAY_DIR/server.ready"
126127
echo "[server] Ready. Relay dir: $RELAY_DIR"
127-
echo "[server] Workdir: $WORKDIR"
128128
echo "[server] Waiting for client handshake..."
129129

130130
# Wait for client handshake

0 commit comments

Comments
 (0)