Skip to content

Commit

Permalink
update test with example template
Browse files Browse the repository at this point in the history
  • Loading branch information
ywang96 committed Aug 7, 2024
1 parent 309a6c8 commit a77db25
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion tests/async_engine/test_openapi_server_ray.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
import os
import pathlib

import openai # use the official client for correctness check
import pytest

from ..utils import RemoteOpenAIServer

# 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")
Expand All @@ -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:
Expand Down

0 comments on commit a77db25

Please sign in to comment.