Unverified Commit 6a846bb1 authored by zhyncs's avatar zhyncs Committed by GitHub
Browse files

misc: update output file logic (#686)

parent 0fdb3127
...@@ -612,7 +612,6 @@ async def benchmark( ...@@ -612,7 +612,6 @@ async def benchmark(
print("{:<40} {:<10.2f}".format("P99 ITL (ms):", metrics.p99_itl_ms)) print("{:<40} {:<10.2f}".format("P99 ITL (ms):", metrics.p99_itl_ms))
print("=" * 50) print("=" * 50)
if enable_multi:
if ( if (
metrics.median_ttft_ms is not None metrics.median_ttft_ms is not None
and metrics.mean_itl_ms is not None and metrics.mean_itl_ms is not None
...@@ -630,6 +629,7 @@ async def benchmark( ...@@ -630,6 +629,7 @@ async def benchmark(
"sharegpt_output_len": args.sharegpt_output_len, "sharegpt_output_len": args.sharegpt_output_len,
"random_input_len": args.random_input_len, "random_input_len": args.random_input_len,
"random_output_len": args.random_output_len, "random_output_len": args.random_output_len,
"random_range_ratio": args.random_range_ratio,
} }
else: else:
print(f"Error running benchmark for request rate: {request_rate}") print(f"Error running benchmark for request rate: {request_rate}")
...@@ -639,8 +639,11 @@ async def benchmark( ...@@ -639,8 +639,11 @@ async def benchmark(
if args.output_file: if args.output_file:
output_file_name = args.output_file output_file_name = args.output_file
else: else:
now = datetime.now().strftime("%m%d%H") now = datetime.now().strftime("%m%d")
output_file_name = f"{args.backend}_{now}.jsonl" if args.dataset_name == "random":
output_file_name = f"{args.backend}_{now}_{args.num_prompts}_{args.random_input_len}_{args.random_output_len}.jsonl"
else:
output_file_name = f"{args.backend}_{now}_{args.num_prompts}_sharegpt.jsonl"
# Append results to a JSONL file # Append results to a JSONL file
with open(output_file_name, "a") as file: with open(output_file_name, "a") as file:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment