mirror of https://github.com/vllm-project/vllm
CI: make sure benchmark script exit on error (#2449)
This commit is contained in:
parent
f780504d12
commit
947f0b23cc
|
@ -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
|
||||
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue