Skip to content

Commit c63530a

Browse files
test multinode
1 parent 4b1f6d5 commit c63530a

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

test/vllm/ec2/test_artifacts/test_ec2.py

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -156,12 +156,15 @@ def test_vllm_benchmark_on_multi_node(head_connection, worker_connection, image_
156156
head_container_id = get_container_id(head_connection, image_uri)
157157
print("Starting model serving inside Ray container...")
158158

159-
container_name = head_connection.run(
159+
result = head_connection.run(
160160
'docker ps --format "{{.Names}}" --filter "ancestor=$IMAGE_URI" | head -n 1'
161-
).strip()
161+
)
162+
container_name = result.stdout.strip()
162163

164+
# Prepare serve command
163165
serve_command = f"vllm serve {model_name} --tensor-parallel-size 8 --pipeline-parallel-size 2 --max-num-batched-tokens 16384"
164166

167+
# Run serve command in container
165168
run_cmd_on_container(
166169
container_name,
167170
head_connection,
@@ -170,12 +173,15 @@ def test_vllm_benchmark_on_multi_node(head_connection, worker_connection, image_
170173
timeout=300,
171174
asynchronous=True,
172175
)
176+
print("Model serving started successfully")
173177

178+
# Run benchmark
174179
print("Running benchmark...")
175180
benchmark_cmd = create_benchmark_command(model_name)
176-
result = head_connection.run(benchmark_cmd, timeout=7200)
181+
benchmark_result = head_connection.run(benchmark_cmd, timeout=7200)
182+
print(f"Benchmark completed: {benchmark_result.stdout}")
177183

178-
return result
184+
return benchmark_result
179185

180186
except Exception as e:
181187
raise Exception(f"Multi-node test execution failed: {str(e)}")

0 commit comments

Comments
 (0)