This repository has been archived by the owner on Oct 11, 2024. It is now read-only.
forked from vllm-project/vllm
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
GHA Benchmark : Automatic benchmarking on manual trigger (#46)
Summary: Add benchmarking workflow and action that runs the benchmarks on a manual trigger. Test: Try it locally. Successful GHA Benchmark Run - https://github.com/neuralmagic/neuralmagic-vllm/actions/runs/8019392326 --------- Co-authored-by: varun <[email protected]> Co-authored-by: Varun Sundar Rabindranath <[email protected]>
- Loading branch information
1 parent
820c992
commit 8b95d03
Showing
10 changed files
with
130 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,30 @@ | ||
name: run vllm benchmarks | ||
description: 'run vllm benchmarks' | ||
inputs: | ||
benchmark_config_list_file: | ||
description: 'Path to a file containing a list of benchmark-configs to run benchmarks with. For reference look at .github/data/nm_benchmark_configs_list.txt' | ||
required: true | ||
output_directory: | ||
description: 'output directory to store the benchmark results' | ||
required: true | ||
python: | ||
description: 'python version, e.g. 3.10.12' | ||
required: true | ||
venv: | ||
description: 'name for python virtual environment' | ||
required: true | ||
runs: | ||
using: composite | ||
steps: | ||
- id: benchmark | ||
run: | | ||
mkdir -p ${{ inputs.output_directory }} | ||
COMMIT=${{ github.sha }} | ||
VENV="${{ inputs.venv }}-${COMMIT:0:7}" | ||
source $(pyenv root)/versions/${{ inputs.python }}/envs/${VENV}/bin/activate | ||
pip3 install -r neuralmagic/benchmarks/requirements-benchmark.txt | ||
SUCCESS=0 | ||
.github/workflows/scripts/nm-run-benchmarks.sh ${{ inputs.output_directory }} || SUCCESS=$? | ||
.github/workflows/scripts/nm-run-benchmarks.sh ${{ inputs.benchmark_config_list_file }} ${{ inputs.output_directory }} || SUCCESS=$? | ||
echo "test=${SUCCESS}" >> "$GITHUB_OUTPUT" | ||
exit ${SUCCESS} | ||
shell: bash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
neuralmagic/benchmarks/configs/benchmark_serving.json | ||
neuralmagic/benchmarks/configs/benchmark_throughput.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 14 additions & 7 deletions
21
.github/workflows/scripts/nm-run-benchmarks.sh
100644 → 100755
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,22 @@ | ||
#!/bin/bash | ||
# GHA uses this script to run benchmarks. | ||
|
||
set -e | ||
set -u | ||
|
||
if [ $# -ne 1 ]; | ||
if [ $# -ne 2 ]; | ||
then | ||
echo "run_benchmarks needs exactly 1 argument - The output path to store the benchmark results" | ||
exit -1 | ||
echo "run_benchmarks needs exactly 2 arguments: " | ||
echo " 1. Path to a .txt file containing the list of benchmark config paths" | ||
echo " 2. The output path to store the benchmark results" | ||
exit 1 | ||
fi | ||
|
||
output_directory=$1 | ||
|
||
touch $ouptut_directory/bench_test_1.txt | ||
touch $ouptut_directory/bench_test_2.txt | ||
benchmark_config_list_file=$1 | ||
output_directory=$2 | ||
|
||
for bench_config in `cat $benchmark_config_list_file` | ||
do | ||
echo "Running benchmarks for config " $bench_config | ||
python3 -m neuralmagic.benchmarks.run_benchmarks -i $bench_config -o $output_directory | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
# requirements specific to the vllm neuralmagic fork | ||
requests | ||
aiohttp | ||
datasets |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters