[Tests] Disable retries and use context manager for openai client (#7565)

This commit is contained in:
Nick Hill
2024-08-26 21:33:17 -07:00
committed by GitHub
parent 2eedede875
commit 39178c7fbc
15 changed files with 130 additions and 93 deletions

View File

@@ -1,5 +1,6 @@
import openai # use the official client for correctness check
import pytest
import pytest_asyncio
import requests
from vllm.transformers_utils.tokenizer import get_tokenizer
@@ -42,9 +43,10 @@ def tokenizer_name(model_name: str,
model_name == "zephyr-lora2") else model_name
@pytest.fixture(scope="module")
def client(server):
return server.get_async_client()
@pytest_asyncio.fixture
async def client(server):
async with server.get_async_client() as async_client:
yield async_client
@pytest.mark.asyncio