Skip to content

Commit

Permalink
CI: make sure benchmark script exit on error (vllm-project#2449)
Browse files Browse the repository at this point in the history
  • Loading branch information
simon-mo committed Jan 16, 2024
1 parent 8c6aa5e commit 0965ee9
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .buildkite/run-benchmarks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@ cd "$(dirname "${BASH_SOURCE[0]}")/.."

# run benchmarks and upload the result to buildkite
python3 benchmarks/benchmark_latency.py 2>&1 | tee benchmark_latency.txt
bench_latency_exit_code=$?

python3 benchmarks/benchmark_throughput.py --input-len 256 --output-len 256 2>&1 | tee benchmark_throughput.txt
bench_throughput_exit_code=$?

# write the results into a markdown file
echo "### Latency Benchmarks" >> benchmark_results.md
Expand All @@ -22,3 +24,12 @@ sed -n '$p' benchmark_throughput.txt >> benchmark_results.md

# upload the results to buildkite
/workspace/buildkite-agent annotate --style "info" --context "benchmark-results" < benchmark_results.md

# exit with the exit code of the benchmarks
if [ $bench_latency_exit_code -ne 0 ]; then
exit $bench_latency_exit_code
fi

if [ $bench_throughput_exit_code -ne 0 ]; then
exit $bench_throughput_exit_code
fi

0 comments on commit 0965ee9

Please sign in to comment.