Skip to content

Commit 76e07e4

Browse files
test single node and multinode
1 parent 277caca commit 76e07e4

File tree

2 files changed

+11
-18
lines changed

2 files changed

+11
-18
lines changed

test/vllm/ec2/test_artifacts/test_ec2.py

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -41,20 +41,6 @@ def setup_env(connection):
4141
connection.run(setup_command)
4242

4343

44-
def create_benchmark_command() -> str:
45-
"""Create command for running benchmark"""
46-
return f"""
47-
source vllm_env/bin/activate &&
48-
python3 /fsx/vllm-dlc/vllm/benchmarks/benchmark_serving.py \
49-
--backend vllm \
50-
--model {MODEL_NAME} \
51-
--endpoint /v1/chat/completions \
52-
--dataset-name sharegpt \
53-
--dataset-path /fsx/vllm-dlc/ShareGPT_V3_unfiltered_cleaned_split.json \
54-
--num-prompts 1000
55-
"""
56-
57-
5844
def get_secret_hf_token():
5945
secret_name = "test/hf_token"
6046
region_name = "us-west-2"
@@ -116,12 +102,9 @@ def test_vllm_benchmark_on_multi_node(head_connection, worker_connection, image_
116102
f"./worker_node_setup.sh {image_uri} {head_ip} {worker_ip}", asynchronous=True
117103
)
118104

119-
head_connection.run(f"./serve.sh {container_name} {MODEL_NAME}", asynchronous=True)
120-
121105
# Run benchmark
122106
print("Running benchmark...")
123-
benchmark_cmd = create_benchmark_command()
124-
benchmark_result = head_connection.run(benchmark_cmd, timeout=7200)
107+
benchmark_result = head_connection.run(f"./serve.sh {container_name} {MODEL_NAME}")
125108
print(f"Benchmark completed: {benchmark_result.stdout}")
126109

127110
return benchmark_result

test/vllm/ec2/utils/serve.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,13 @@ while ! curl -s "http://localhost:8000/v1/completions" \
1818
done
1919

2020
echo "Model is ready"
21+
22+
source vllm_env/bin/activate
23+
24+
python3 /fsx/vllm-dlc/vllm/benchmarks/benchmark_serving.py \
25+
--backend vllm \
26+
--model $MODEL_NAME \
27+
--endpoint /v1/chat/completions \
28+
--dataset-name sharegpt \
29+
--dataset-path /fsx/vllm-dlc/ShareGPT_V3_unfiltered_cleaned_split.json \
30+
--num-prompts 1000

0 commit comments

Comments
 (0)