Skip to content

Commit b8796b0

Browse files
authored
[Doc][Example][Bugfix] Elements in local_device_ids should be casted … (#3782)
### What this PR does / why we need it? It's a tiny bugfix in the `gen_ranktable.py` script. The script is an util to help setup an example case. It is used to prepare a ranktable before disaggregated prefill deployment. Elements in `local_device_ids` list should be casted to `int` type before referred for a MOD math operation. ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? No. - vLLM version: v0.11.0 - vLLM main: vllm-project/vllm@c9461e0 --------- Signed-off-by: paulyu12 <[email protected]>
1 parent 638d8d1 commit b8796b0

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

examples/disaggregated_prefill_v1/gen_ranktable.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,11 @@ def get_cmd_stdout(cmd):
6363
chips_per_card = int(chips_per_card)
6464

6565
if args.local_device_ids:
66-
local_device_ids = args.local_device_ids.split(',')
66+
try:
67+
local_device_ids = [int(id_str) for id_str in args.local_device_ids.split(',')]
68+
except ValueError:
69+
print(f"Error: --local-device-ids must be a comma-separated list of integers. Received: '{args.local_device_ids}'")
70+
exit(1)
6771
else:
6872
local_device_ids = []
6973
for card_id in range(num_cards):

0 commit comments

Comments
 (0)