From 02fc5781c817a20ea61ef1ba5090bc0d3c11eabb Mon Sep 17 00:00:00 2001 From: Michael Wyatt Date: Wed, 27 Mar 2024 15:44:37 -0700 Subject: [PATCH] dynamic setting of requst num and formatting (#880) --- benchmarks/inference/mii/run_benchmark.py | 2 ++ benchmarks/inference/mii/src/utils.py | 6 ++---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/benchmarks/inference/mii/run_benchmark.py b/benchmarks/inference/mii/run_benchmark.py index 801d45b85..858498884 100644 --- a/benchmarks/inference/mii/run_benchmark.py +++ b/benchmarks/inference/mii/run_benchmark.py @@ -30,6 +30,8 @@ def run_benchmark() -> None: ) continue + if client_args.num_requests is None: + client_args.num_requests = client_args.num_clients * 4 + 32 response_details = run_client(client_args) print_summary(client_args, response_details) save_json_results(client_args, response_details) diff --git a/benchmarks/inference/mii/src/utils.py b/benchmarks/inference/mii/src/utils.py index a3b156fd2..23e108f8d 100644 --- a/benchmarks/inference/mii/src/utils.py +++ b/benchmarks/inference/mii/src/utils.py @@ -91,7 +91,7 @@ def parse_args( client_parser.add_argument( "--num_requests", type=int, - default=512, + default=None, help="Number of requests to process by clients", ) client_parser.add_argument( @@ -159,9 +159,7 @@ def parse_args( parser.add_argument( "--overwrite_results", action="store_true", help="Overwrite existing results" ) - parser.add_argument( - "--fp6", action="store_true", help="Enable FP6" - ) + parser.add_argument("--fp6", action="store_true", help="Enable FP6") # Parse arguments args = parser.parse_args()