Skip to content

Commit 74f60f2

Browse files
committed
running synthetic with sharegpt
1 parent 9c5cb8d commit 74f60f2

File tree

3 files changed

+13
-12
lines changed

3 files changed

+13
-12
lines changed

.github/workflows/run_benchmarks_gke.yaml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -91,13 +91,6 @@ jobs:
9191
echo "✅ Running benchmark script..."
9292
python run-bench.py
9393
94-
# eventually we will use /srv/runner-db as a database for the dashboard
95-
# results files include TTFT, ITL, and the bench-spec.yaml content that ran the benchmark
96-
- name: Save .results files to local DB folder outside workspace
97-
run: |
98-
find 4-latest-results/ -name '*.results' -exec cp {} ~/srv/runner-db/ \;
99-
echo "✅ Saved .results files to ~/srv/runner-db/"
100-
10194
- name: Upload .results artifacts to GitHub
10295
uses: actions/upload-artifact@v4
10396
with:

3-workloads/synthetic/run_synthetic.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ NUM_ROUNDS=$6
2121
SYSTEM_PROMPT=$7
2222
CHAT_HISTORY=$8
2323
ANSWER_LEN=$9
24-
USE_SHAREGPT=${10:-false}
24+
USE_SHAREGPT=$10
2525
# If QPS values are provided, use them; otherwise use default
26-
if [ $# -gt 9 ]; then
27-
QPS_VALUES=("${@:10}")
26+
if [ $# -gt 10 ]; then
27+
QPS_VALUES=("${@:11}")
2828
else
2929
QPS_VALUES=(0.7) # Default QPS value
3030
fi
@@ -80,7 +80,7 @@ run_benchmark() {
8080
# Run benchmarks for each QPS value
8181
for qps in "${QPS_VALUES[@]}"; do
8282
run_benchmark "$qps"
83-
local output_file="../../4-latest-results/${KEY}_synthetic_output_${qps}.csv"
83+
output_file="../../4-latest-results/${KEY}_synthetic_output_${qps}.csv"
8484
python3 "../../4-latest-results/post-processing/summarize.py" \
8585
"$output_file" \
8686
KEY="$KEY" \

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

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,9 +100,17 @@ def process_output(filename: str, **kwargs):
100100
f.write(bench_spec_content)
101101
f.write("\n===========================================================\n")
102102

103-
# Add the specific workload that was run (a subset of Workloads in bench-spec.yaml)
104103
print(f"Performance summary saved to {results_path}")
105104

105+
# Save a copy of the results file to ~/srv/runner-db/
106+
runner_db_path = os.path.expanduser("~/srv/runner-db/")
107+
os.makedirs(runner_db_path, exist_ok=True)
108+
runner_db_file = os.path.join(runner_db_path, f"{filename_without_parent_or_ext}-{timestamp}.results")
109+
110+
# Copy the contents to the new location
111+
with open(results_path, "r") as src, open(runner_db_file, "w") as dst:
112+
dst.write(src.read())
113+
106114
if __name__ == "__main__":
107115
if len(sys.argv) < 2:
108116
print("Usage: python summarize.py <path_to_csv> [key=value ...]")

0 commit comments

Comments
 (0)