"vscode:/vscode.git/clone" did not exist on "af23c45726b6ab5f43c4e96c83c7df4dce1fe349"
Unverified Commit 094891c0 authored by vzed's avatar vzed Committed by GitHub
Browse files

fix: Use `is not None` instead of `!= None` for None checks. (#5687)

parent a21ef363
......@@ -1000,7 +1000,7 @@ async def benchmark(
# Use the first request for all warmup iterations
test_prompt, test_prompt_len, test_output_len = input_requests[0]
if lora_names != None and len(lora_names) != 0:
if lora_names is not None and len(lora_names) != 0:
lora_name = lora_names[0]
else:
lora_name = None
......@@ -1060,7 +1060,7 @@ async def benchmark(
tasks: List[asyncio.Task] = []
async for request in get_request(input_requests, request_rate):
prompt, prompt_len, output_len = request
if lora_names != None and len(lora_names) != 0:
if lora_names is not None and len(lora_names) != 0:
idx = random.randint(0, len(lora_names) - 1)
lora_name = lora_names[idx]
else:
......
......@@ -113,7 +113,7 @@ def completion_template_exists(template_name: str) -> bool:
def is_completion_template_defined() -> bool:
global completion_template_name
return completion_template_name != None
return completion_template_name is not None
def generate_completion_prompt_from_request(request: ChatCompletionRequest) -> str:
......
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