Skip to content

Commit acd5eaf

Browse files
committed
chore: apply pre-commit
Signed-off-by: Junichi Sato <[email protected]>
1 parent 7213add commit acd5eaf

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

benchmarks/backend_request_func.py

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,8 @@ async def async_request_tgi(
5151
api_url = request_func_input.api_url
5252
assert api_url.endswith("generate_stream")
5353

54-
async with aiohttp.ClientSession(trust_env=True, timeout=AIOHTTP_TIMEOUT) as session:
54+
async with aiohttp.ClientSession(trust_env=True,
55+
timeout=AIOHTTP_TIMEOUT) as session:
5556
params = {
5657
"best_of": request_func_input.best_of,
5758
"max_new_tokens": request_func_input.output_len,
@@ -123,7 +124,8 @@ async def async_request_trt_llm(
123124
api_url = request_func_input.api_url
124125
assert api_url.endswith("generate_stream")
125126

126-
async with aiohttp.ClientSession(trust_env=True, timeout=AIOHTTP_TIMEOUT) as session:
127+
async with aiohttp.ClientSession(trust_env=True,
128+
timeout=AIOHTTP_TIMEOUT) as session:
127129
assert request_func_input.best_of == 1
128130
payload = {
129131
"accumulate_tokens": True,
@@ -187,7 +189,8 @@ async def async_request_deepspeed_mii(
187189
request_func_input: RequestFuncInput,
188190
pbar: Optional[tqdm] = None,
189191
) -> RequestFuncOutput:
190-
async with aiohttp.ClientSession(trust_env=True, timeout=AIOHTTP_TIMEOUT) as session:
192+
async with aiohttp.ClientSession(trust_env=True,
193+
timeout=AIOHTTP_TIMEOUT) as session:
191194
assert request_func_input.best_of == 1
192195

193196
payload = {
@@ -235,7 +238,8 @@ async def async_request_openai_completions(
235238
("completions", "profile")
236239
), "OpenAI Completions API URL must end with 'completions' or 'profile'."
237240

238-
async with aiohttp.ClientSession(trust_env=True, timeout=AIOHTTP_TIMEOUT) as session:
241+
async with aiohttp.ClientSession(trust_env=True,
242+
timeout=AIOHTTP_TIMEOUT) as session:
239243
payload = {
240244
"model": request_func_input.model_name \
241245
if request_func_input.model_name else request_func_input.model,
@@ -332,7 +336,8 @@ async def async_request_openai_chat_completions(
332336
"chat/completions"
333337
), "OpenAI Chat Completions API URL must end with 'chat/completions'."
334338

335-
async with aiohttp.ClientSession(trust_env=True, timeout=AIOHTTP_TIMEOUT) as session:
339+
async with aiohttp.ClientSession(trust_env=True,
340+
timeout=AIOHTTP_TIMEOUT) as session:
336341
content = [{"type": "text", "text": request_func_input.prompt}]
337342
if request_func_input.multi_modal_content:
338343
content.append(request_func_input.multi_modal_content)

0 commit comments

Comments
 (0)