forked from vllm-project/vllm
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Run v1 benchmark and integrate with PyTorch OSS benchmark database (v…
…llm-project#13068) Signed-off-by: Huy Do <[email protected]>
- Loading branch information
Showing
7 changed files
with
167 additions
and
45 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
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 |
---|---|---|
|
@@ -29,4 +29,4 @@ | |
"num-iters": 15 | ||
} | ||
} | ||
] | ||
] |
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
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,39 @@ | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
import argparse | ||
import os | ||
from typing import Any, Dict, List | ||
|
||
|
||
def convert_to_pytorch_benchmark_format(args: argparse.Namespace, | ||
metrics: Dict[str, List], | ||
extra_info: Dict[str, Any]) -> List: | ||
""" | ||
Save the benchmark results in the format used by PyTorch OSS benchmark with | ||
on metric per record | ||
https://github.com/pytorch/pytorch/wiki/How-to-integrate-with-PyTorch-OSS-benchmark-database | ||
""" | ||
records = [] | ||
if not os.environ.get("SAVE_TO_PYTORCH_BENCHMARK_FORMAT", False): | ||
return records | ||
|
||
for name, benchmark_values in metrics.items(): | ||
record = { | ||
"benchmark": { | ||
"name": "vLLM benchmark", | ||
"extra_info": { | ||
"args": vars(args), | ||
}, | ||
}, | ||
"model": { | ||
"name": args.model, | ||
}, | ||
"metric": { | ||
"name": name, | ||
"benchmark_values": benchmark_values, | ||
"extra_info": extra_info, | ||
}, | ||
} | ||
records.append(record) | ||
|
||
return records |