We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 916d219 commit 8840753Copy full SHA for 8840753
benchmarks/backend_request_func.py
@@ -68,9 +68,13 @@ async def async_request_tgi(
68
chunk_bytes = chunk_bytes.strip()
69
if not chunk_bytes:
70
continue
71
+ chunk_bytes = chunk_bytes.decode("utf-8")
72
- chunk = remove_prefix(chunk_bytes.decode("utf-8"),
73
- "data:")
+ #NOTE: Sometimes TGI returns a ping response without
74
+ # any data, we should skip it.
75
+ if chunk_bytes.startswith(":"):
76
+ continue
77
+ chunk = remove_prefix(chunk_bytes, "data:")
78
79
data = json.loads(chunk)
80
timestamp = time.perf_counter()
0 commit comments