Skip to content

Commit 7ecdc4d

Browse files
authored
ci: Fix L0_triton_cli_test_vllm--base (#122)
1 parent 7093ec9 commit 7ecdc4d

6 files changed

Lines changed: 33 additions & 12 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,7 @@ curl -s http://localhost:9000/v1/chat/completions -H 'Content-Type: application/
356356
}'
357357

358358
# Profile model with GenAI-Perf
359-
triton profile -m llama-3.1-8b-instruct --service-kind openai --endpoint-type chat --url localhost:9000 --streaming
359+
triton profile -m llama-3.1-8b-instruct --endpoint-type chat --url localhost:9000 --streaming
360360
```
361361

362362
## Additional Dependencies for Custom Environments

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ dependencies = [
5151
"grpcio>=1.67.0",
5252
# Use explicit client version matching genai-perf version for tagged release
5353
"tritonclient[all] == 2.55.0",
54-
"genai-perf @ git+https://github.com/triton-inference-server/perf_analyzer.git@r25.02#subdirectory=genai-perf",
54+
"genai-perf @ git+https://github.com/triton-inference-server/perf_analyzer.git@main#subdirectory=genai-perf",
5555
# Misc deps
5656
"directory-tree == 0.0.4", # may remove in future
5757
# https://github.com/docker/docker-py/issues/3256#issuecomment-2376439000

src/triton_cli/repository.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,6 @@ def __generate_vllm_model(self, huggingface_id: str):
315315
model_contents = json.dumps(
316316
{
317317
"model": huggingface_id,
318-
"disable_log_requests": True,
319318
"gpu_memory_utilization": 0.85,
320319
}
321320
)

tests/test_e2e.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,7 @@ def test_tensorrtllm_openai_e2e(self, trtllm_openai_server):
8989
TritonCommands._clear()
9090
TritonCommands._import(model, source=source, backend="tensorrtllm")
9191
trtllm_openai_server.start()
92-
TritonCommands._profile(
93-
model, service_kind="openai", endpoint_type="chat", url="localhost:9000"
94-
)
92+
TritonCommands._profile(model, endpoint_type="chat", url="localhost:9000")
9593

9694
@pytest.mark.skipif(
9795
os.environ.get("IMAGE_KIND") != "VLLM", reason="Only run for VLLM image"
@@ -141,9 +139,7 @@ def test_vllm_openai_e2e(self, vllm_openai_server):
141139
TritonCommands._clear()
142140
TritonCommands._import(model, source=source)
143141
vllm_openai_server.start()
144-
TritonCommands._profile(
145-
model, service_kind="openai", endpoint_type="chat", url="localhost:9000"
146-
)
142+
TritonCommands._profile(model, endpoint_type="chat", url="localhost:9000")
147143

148144
@pytest.mark.skipif(
149145
os.environ.get("CI_PIPELINE") == "GITHUB_ACTIONS",

tests/test_models/mock_llm/config.pbtxt

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,18 @@ input [
3737
name: "max_tokens"
3838
data_type: TYPE_INT32
3939
dims: [ 1 ]
40+
},
41+
{
42+
name: "exclude_input_in_output"
43+
data_type: TYPE_BOOL
44+
dims: [ 1 ]
45+
optional: true
46+
},
47+
{
48+
name: "stream"
49+
data_type: TYPE_BOOL
50+
dims: [ 1 ]
51+
optional: true
4052
}
4153
]
4254
output [

tests/utils.py

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,16 +73,30 @@ def _infer(model, prompt=None, protocol=None):
7373
args += ["-i", protocol]
7474
run(args)
7575

76-
def _profile(model, backend=None, service_kind=None, endpoint_type=None, url=None):
76+
def _profile(model, backend=None, endpoint_type=None, url=None):
7777
args = ["profile", "-m", model]
7878
if backend:
7979
args += ["--backend", backend]
80-
if service_kind:
81-
args += ["--service-kind", service_kind]
80+
8281
if endpoint_type:
8382
args += ["--endpoint-type", endpoint_type]
83+
8484
if url:
8585
args += ["--url", url]
86+
87+
# Map each model to its corresponding HuggingFace tokenizer.
88+
# For the mock model, use a real tokenizer since "mock_llm" is not available on HuggingFace.
89+
tokenizer_map = {
90+
"mock_llm": "gpt2",
91+
"gpt2": "gpt2",
92+
"llama-3.1-8b-instruct": "meta-llama/Llama-3.1-8B-Instruct",
93+
"llama-2-7b-chat": "meta-llama/Llama-2-7b-chat-hf",
94+
"llama-2-7b": "meta-llama/Llama-2-7b-hf",
95+
}
96+
97+
if model in tokenizer_map:
98+
args += ["--tokenizer", tokenizer_map[model]]
99+
86100
# NOTE: With default parameters, genai-perf may take upwards of 1m30s or 2m to run,
87101
# so limit the genai-perf run with --request-count to reduce time for testing purposes.
88102
args += ["--synthetic-input-tokens-mean", "100", "--", "--request-count", "10"]

0 commit comments

Comments
 (0)