Skip to content

Commit 49569aa

Browse files
Update scripts/server-bench.py
Co-authored-by: Sigbjørn Skjæret <[email protected]>
1 parent 6e337a6 commit 49569aa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scripts/server-bench.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ def send_prompt(data: dict) -> tuple[float, list[float]]:
146146
lines.append(line)
147147
token_arrival_times.append(time())
148148
token_arrival_times = token_arrival_times[:-1]
149-
if "timings" in json.loads(lines[-2][6:]):
149+
if len(lines) > 1 and "timings" in json.loads(lines[-2][6:]):
150150
token_arrival_times = token_arrival_times[:-1]
151151

152152
if response.status_code != 200:

0 commit comments

Comments
 (0)