Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/offline_disaggregated_prefill_npu.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def run_prefill(prefill_done, process_close):


def run_decode(prefill_done):
os.environ['VLLM_LLMDD_RPC_PORT'] = '6634'
os.environ['VLLM_ASCEND_LLMDD_RPC_PORT'] = '6634'
# ranktable.json needs be generated using gen_ranktable.sh
# from the examples/disaggregated_prefill_v1 module in the main branch.
os.environ['DISAGGREGATED_PREFILL_RANK_TABLE_PATH'] = "./ranktable.json"
Expand Down
4 changes: 2 additions & 2 deletions tests/e2e/pd_disaggreate/run_edge_case_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ run_tests_for_model() {
# Start prefill instance
PREFILL_PORT=8001

BASE_CMD="ASCEND_RT_VISIBLE_DEVICES=0 VLLM_LLMDD_RPC_PORT=5559 vllm serve $model_name \
BASE_CMD="ASCEND_RT_VISIBLE_DEVICES=0 VLLM_ASCEND_LLMDD_RPC_PORT=5559 vllm serve $model_name \
Copy link
Contributor

Choose a reason for hiding this comment

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

high

The variable BASE_CMD is defined here and then redefined on line 93 for the decode instance. This pattern of reusing and redefining variables is error-prone and can make the script difficult to maintain. To improve clarity and prevent potential bugs, I recommend using a unique name for this command, such as PREFILL_BASE_CMD.

--port $PREFILL_PORT \
--seed 1024 \
--enforce-eager \
Expand All @@ -90,7 +90,7 @@ run_tests_for_model() {
DECODE_PORT=8002

# Build the command with or without model-specific args
BASE_CMD="ASCEND_RT_VISIBLE_DEVICES=1 VLLM_LLMDD_RPC_PORT=6000 vllm serve $model_name \
BASE_CMD="ASCEND_RT_VISIBLE_DEVICES=1 VLLM_ASCEND_LLMDD_RPC_PORT=6000 vllm serve $model_name \
Copy link
Contributor

Choose a reason for hiding this comment

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

high

This line redefines the BASE_CMD variable, which was first assigned on line 73. Reusing variable names this way can lead to confusion and makes the script fragile. A better practice is to use a distinct variable name for the decode command, like DECODE_BASE_CMD, to make the script's logic clearer and more robust against future changes.

--port $DECODE_PORT \
--seed 1024 \
--enforce-eager \
Expand Down
Loading