Skip to content

Commit 9ac0fb7

Browse files
committed
update
1 parent db49cda commit 9ac0fb7

3 files changed

Lines changed: 15 additions & 7 deletions

File tree

python/openai/openai_frontend/engine/triton_engine.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -998,7 +998,7 @@ def _validate_completion_request(
998998

999999
if "best_of" in request.model_fields_set and metadata.backend == "vllm":
10001000
raise ClientError(
1001-
"best_of is not supported for the vLLM backend, removed from vLLM V1 engine"
1001+
"best_of is no longer supported in vLLM backend, removed from vLLM V1 engine"
10021002
)
10031003
if request.best_of and request.best_of > 1:
10041004
raise ClientError(

python/openai/requirements-test.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
1+
# Copyright 2024-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
22
#
33
# Redistribution and use in source and binary forms, with or without
44
# modification, are permitted provided that the following conditions
@@ -26,7 +26,7 @@
2626

2727

2828
# The latest stable version of anyio is 4.12.1 which caused segfault during tests. See TRI-620.
29-
anyio==4.12.0
29+
anyio==4.11.0
3030

3131
# Testing
3232
pytest==8.1.1

python/openai/tests/test_completions.py

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2024-2025, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
1+
# Copyright 2024-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
22
#
33
# Redistribution and use in source and binary forms, with or without
44
# modification, are permitted provided that the following conditions
@@ -57,7 +57,6 @@ def test_completions_defaults(self, client, model: str, prompt: str):
5757
("top_p", 0.9),
5858
("frequency_penalty", 0.5),
5959
("presence_penalty", 0.2),
60-
("best_of", 1),
6160
("n", 1),
6261
# logprobs is an integer for completions
6362
("logprobs", 5),
@@ -359,7 +358,12 @@ def test_no_prompt(self, client, model: str):
359358
],
360359
)
361360
def test_completions_multiple_choices(
362-
self, client, sampling_parameter_dict: dict, model: str, prompt: str
361+
self,
362+
client,
363+
sampling_parameter_dict: dict,
364+
backend: str,
365+
model: str,
366+
prompt: str,
363367
):
364368
response = client.post(
365369
"/v1/completions",
@@ -370,7 +374,11 @@ def test_completions_multiple_choices(
370374
# FIXME: Add support and test for success
371375
# Expected to fail when n or best_of > 1, only single choice supported for now
372376
assert response.status_code == 400
373-
assert "only single choice" in response.json()["detail"]
377+
if backend == "vllm" and "best_of" in sampling_parameter_dict:
378+
error_message = "best_of is no longer supported in vLLM backend"
379+
else:
380+
error_message = "only single choice"
381+
assert error_message in response.json()["detail"]
374382

375383
@pytest.mark.skip(reason="Not Implemented Yet")
376384
def test_lora(self):

0 commit comments

Comments
 (0)