Skip to content

Commit 7a5977c

Browse files
committed
fixed run scripts
1 parent 74f60f2 commit 7a5977c

File tree

11 files changed

+54
-35
lines changed

11 files changed

+54
-35
lines changed

1-infrastructure/ADDING_INFRA.md

Whitespace-only changes.

2-serving-engines/ADDING_BASELINE.md

Whitespace-only changes.

3-workloads/ADDING_WORKLOAD.md

Whitespace-only changes.

3-workloads/README.md

Lines changed: 0 additions & 7 deletions
This file was deleted.

3-workloads/agentic/run_agentic.sh

Lines changed: 20 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
# Get the directory where this script is located
44
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
5+
PROJECT_ROOT="$( cd "$SCRIPT_DIR/../../" && pwd )"
56
cd "$SCRIPT_DIR"
67

78
if [[ $# -lt 3 ]]; then
@@ -22,7 +23,7 @@ SYSTEM_PROMPT=$7
2223
CHAT_HISTORY=$8
2324
ANSWER_LEN=$9
2425

25-
# Optional QPS-like values (well use as new-user-intervals here)
26+
# Optional QPS-like values (we'll use as new-user-intervals here)
2627
if [ $# -gt 9 ]; then
2728
NEW_USER_INTERVALS=("${@:10}")
2829
else
@@ -80,16 +81,22 @@ run_benchmark() {
8081
# Run benchmarks for each new_user_interval value
8182
for interval in "${NEW_USER_INTERVALS[@]}"; do
8283
run_benchmark "$interval"
83-
local output_file="../../4-latest-results/${KEY}_agentic_output_${interval}.csv"
84-
python3 "../../4-latest-results/post-processing/summarize.py" \
85-
"$output_file" \
86-
KEY="$KEY" \
87-
WORKLOAD="agentic" \
88-
NUM_USERS_WARMUP="$NUM_USERS_WARMUP" \
89-
NUM_AGENTS="$NUM_AGENTS" \
90-
NUM_ROUNDS="$NUM_ROUNDS" \
91-
SYSTEM_PROMPT="$SYSTEM_PROMPT" \
92-
CHAT_HISTORY="$CHAT_HISTORY" \
93-
ANSWER_LEN="$ANSWER_LEN" \
94-
NEW_USER_INTERVAL="$interval"
84+
output_file="../../4-latest-results/${KEY}_agentic_output_${interval}.csv"
85+
86+
# Change to project root before running summarize.py
87+
cd "$PROJECT_ROOT"
88+
python3 "4-latest-results/post-processing/summarize.py" \
89+
"${output_file#../../}" \
90+
KEY="$KEY" \
91+
WORKLOAD="agentic" \
92+
NUM_USERS_WARMUP="$NUM_USERS_WARMUP" \
93+
NUM_AGENTS="$NUM_AGENTS" \
94+
NUM_ROUNDS="$NUM_ROUNDS" \
95+
SYSTEM_PROMPT="$SYSTEM_PROMPT" \
96+
CHAT_HISTORY="$CHAT_HISTORY" \
97+
ANSWER_LEN="$ANSWER_LEN" \
98+
NEW_USER_INTERVAL="$interval"
99+
100+
# Change back to script directory
101+
cd "$SCRIPT_DIR"
95102
done

3-workloads/mooncake/run_mooncake.sh

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
# Get the directory where this script is located
44
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
5+
PROJECT_ROOT="$( cd "$SCRIPT_DIR/../../" && pwd )"
56
cd "$SCRIPT_DIR"
67

78
if [[ $# -ne 7 ]]; then
@@ -49,15 +50,21 @@ chmod +x ./prepare_mooncake.sh
4950

5051
# Run benchmarks for the determined QPS values
5152
for qps in "${QPS_VALUES[@]}"; do
52-
output_file="$../../4-latest-results/${KEY}_mooncake_output_${qps}.csv"
53+
output_file="../../4-latest-results/${KEY}_mooncake_output_${qps}.csv"
5354
run_mooncake "$qps" "$output_file"
54-
python3 "../../4-latest-results/post-processing/summarize.py" \
55-
"$output_file" \
55+
56+
# Change to project root before running summarize.py
57+
cd "$PROJECT_ROOT"
58+
python3 "4-latest-results/post-processing/summarize.py" \
59+
"${output_file#../../}" \
5660
KEY="$KEY" \
5761
WORKLOAD="mooncake" \
5862
NUM_ROUNDS="$NUM_ROUNDS" \
5963
SYSTEM_PROMPT="$SYSTEM_PROMPT" \
6064
CHAT_HISTORY="$CHAT_HISTORY" \
6165
ANSWER_LEN="$ANSWER_LEN" \
6266
QPS="$qps"
67+
68+
# Change back to script directory
69+
cd "$SCRIPT_DIR"
6370
done

3-workloads/sharegpt/workload_execution/run-sharegpt.sh

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
# Get the directory where this script is located
44
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
5+
PROJECT_ROOT="$( cd "$SCRIPT_DIR/../../../" && pwd )"
56
cd "$SCRIPT_DIR"
67

78
# Set the path to the 4-latest-results directory
@@ -62,12 +63,17 @@ for qps in "${QPS_VALUES[@]}"; do
6263
output_file="../../../4-latest-results/${KEY}_sharegpt_output_${qps}.csv"
6364
warm_up "$qps"
6465
run_benchmark "$qps" "$output_file"
65-
python3 "../../../4-latest-results/post-processing/summarize.py" \
66-
"$output_file" \
66+
67+
# Change to project root before running summarize.py
68+
cd "$PROJECT_ROOT"
69+
python3 "4-latest-results/post-processing/summarize.py" \
70+
"${output_file#../../../}" \
6771
KEY="$KEY" \
6872
WORKLOAD="sharegpt" \
6973
LIMIT="$LIMIT" \
7074
MIN_ROUNDS="$MIN_ROUNDS" \
7175
START_ROUND="$START_ROUND" \
7276
QPS="$qps"
77+
# Change back to script directory
78+
cd "$SCRIPT_DIR"
7379
done

3-workloads/synthetic/run_synthetic.sh

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
# Get the directory where this script is located
44
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
5+
PROJECT_ROOT="$( cd "$SCRIPT_DIR/../.." && pwd )"
56
cd "$SCRIPT_DIR"
67

78
if [[ $# -lt 3 ]]; then
@@ -80,9 +81,11 @@ run_benchmark() {
8081
# Run benchmarks for each QPS value
8182
for qps in "${QPS_VALUES[@]}"; do
8283
run_benchmark "$qps"
83-
output_file="../../4-latest-results/${KEY}_synthetic_output_${qps}.csv"
84-
python3 "../../4-latest-results/post-processing/summarize.py" \
85-
"$output_file" \
84+
85+
# Change to project root before running summarize.py
86+
cd "$PROJECT_ROOT"
87+
python3 "4-latest-results/post-processing/summarize.py" \
88+
"${KEY}_synthetic_output_${qps}.csv" \
8689
KEY="$KEY" \
8790
WORKLOAD="synthetic" \
8891
NUM_USERS_WARMUP="$NUM_USERS_WARMUP" \
@@ -93,4 +96,7 @@ for qps in "${QPS_VALUES[@]}"; do
9396
ANSWER_LEN="$ANSWER_LEN" \
9497
QPS="$qps" \
9598
USE_SHAREGPT="$USE_SHAREGPT"
99+
100+
# Change back to script directory
101+
cd "$SCRIPT_DIR"
96102
done
File renamed without changes.

4-latest-results/post-processing/summarize.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ def process_output(filename: str, **kwargs):
8282
line for line in spec_file if "hf_token" not in line
8383
)
8484
else:
85-
print("bench-spec.yaml not found")
85+
print("bench-spec.yaml not found in summarize.py")
8686

8787
with open(results_path, "w") as f:
8888
# Write the timestamp

0 commit comments

Comments
 (0)