[CI] Add Buildkite (#2355)

This commit is contained in:
Simon Mo
2024-01-14 12:37:58 -08:00
committed by GitHub
parent 9f659bf07f
commit 6e01e8c1c8
13 changed files with 192 additions and 37 deletions

View File

@@ -29,8 +29,13 @@ def api_server():
script_path = Path(__file__).parent.joinpath(
"api_server_async_engine.py").absolute()
uvicorn_process = subprocess.Popen([
sys.executable, "-u",
str(script_path), "--model", "facebook/opt-125m"
sys.executable,
"-u",
str(script_path),
"--model",
"facebook/opt-125m",
"--host",
"127.0.0.1",
])
yield
uvicorn_process.terminate()
@@ -81,6 +86,9 @@ def test_api_server(api_server):
pool.join()
# check cancellation stats
# give it some times to update the stats
time.sleep(1)
num_aborted_requests = requests.get(
"http://localhost:8000/stats").json()["num_aborted_requests"]
assert num_aborted_requests > 0