From a77db250c6f538f37effd3566d0fa9806e69c17f Mon Sep 17 00:00:00 2001 From: Roger Wang Date: Tue, 6 Aug 2024 21:29:12 -0700 Subject: [PATCH] update test with example template --- tests/async_engine/test_openapi_server_ray.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/tests/async_engine/test_openapi_server_ray.py b/tests/async_engine/test_openapi_server_ray.py index 5ecd770ede836..d30a4d9c945f5 100644 --- a/tests/async_engine/test_openapi_server_ray.py +++ b/tests/async_engine/test_openapi_server_ray.py @@ -1,3 +1,6 @@ +import os +import pathlib + import openai # use the official client for correctness check import pytest @@ -5,6 +8,9 @@ # any model with a chat template should work here MODEL_NAME = "facebook/opt-125m" +chatml_jinja_path = pathlib.Path(os.path.dirname(os.path.abspath( + __file__))).parent.parent / "examples/template_chatml.jinja" +assert chatml_jinja_path.exists() @pytest.fixture(scope="module") @@ -16,7 +22,9 @@ def server(): "--max-model-len", "2048", "--enforce-eager", - "--engine-use-ray" + "--engine-use-ray", + "--chat-template", + str(chatml_jinja_path), ] with RemoteOpenAIServer(MODEL_NAME, args) as remote_server: