Skip to content

Commit 2c26980

Browse files
Update examples/disaggregated_prefill_v1/gen_ranktable.py
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
1 parent 35a6ba3 commit 2c26980

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

examples/disaggregated_prefill_v1/gen_ranktable.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +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(',')
67-
local_device_ids = [int(id_str) for id_str in local_device_ids]
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)
6871
else:
6972
local_device_ids = []
7073
for card_id in range(num_cards):

0 commit comments

Comments
 (0)