Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenDAS
vllm_cscc
Commits
896e41ae
Unverified
Commit
896e41ae
authored
Nov 18, 2025
by
Isotr0py
Committed by
GitHub
Nov 18, 2025
Browse files
[CI/Build] Replace wikipedia url with local server ones (#28908)
Signed-off-by:
Isotr0py
<
mozf@mail2.sysu.edu.cn
>
parent
5bb1da51
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
2 deletions
+11
-2
tests/entrypoints/openai/test_metrics.py
tests/entrypoints/openai/test_metrics.py
+11
-2
No files found.
tests/entrypoints/openai/test_metrics.py
View file @
896e41ae
...
@@ -16,6 +16,7 @@ from transformers import AutoTokenizer
...
@@ -16,6 +16,7 @@ from transformers import AutoTokenizer
from
vllm
import
version
from
vllm
import
version
from
...conftest
import
LocalAssetServer
from
...utils
import
RemoteOpenAIServer
from
...utils
import
RemoteOpenAIServer
MODELS
=
{
MODELS
=
{
...
@@ -69,7 +70,6 @@ async def client(server):
...
@@ -69,7 +70,6 @@ async def client(server):
_PROMPT
=
"Hello my name is Robert and I love magic"
_PROMPT
=
"Hello my name is Robert and I love magic"
_IMAGE_URL
=
"https://upload.wikimedia.org/wikipedia/commons/thumb/d/dd/Gfp-wisconsin-madison-the-nature-boardwalk.jpg/2560px-Gfp-wisconsin-madison-the-nature-boardwalk.jpg"
def
_get_expected_values
(
num_requests
:
int
,
prompt_ids
:
list
[
int
],
max_tokens
:
int
):
def
_get_expected_values
(
num_requests
:
int
,
prompt_ids
:
list
[
int
],
max_tokens
:
int
):
...
@@ -250,6 +250,7 @@ HIDDEN_DEPRECATED_METRICS: list[str] = [
...
@@ -250,6 +250,7 @@ HIDDEN_DEPRECATED_METRICS: list[str] = [
@
pytest
.
mark
.
asyncio
@
pytest
.
mark
.
asyncio
async
def
test_metrics_exist
(
async
def
test_metrics_exist
(
local_asset_server
:
LocalAssetServer
,
server
:
RemoteOpenAIServer
,
server
:
RemoteOpenAIServer
,
client
:
openai
.
AsyncClient
,
client
:
openai
.
AsyncClient
,
model_key
:
str
,
model_key
:
str
,
...
@@ -265,13 +266,21 @@ async def test_metrics_exist(
...
@@ -265,13 +266,21 @@ async def test_metrics_exist(
temperature
=
0.0
,
temperature
=
0.0
,
)
)
else
:
else
:
# https://upload.wikimedia.org/wikipedia/commons/thumb/d/dd/Gfp-wisconsin-madison-the-nature-boardwalk.jpg/2560px-Gfp-wisconsin-madison-the-nature-boardwalk.jpg
await
client
.
chat
.
completions
.
create
(
await
client
.
chat
.
completions
.
create
(
model
=
model_name
,
model
=
model_name
,
messages
=
[
messages
=
[
{
{
"role"
:
"user"
,
"role"
:
"user"
,
"content"
:
[
"content"
:
[
{
"type"
:
"image_url"
,
"image_url"
:
{
"url"
:
_IMAGE_URL
}},
{
"type"
:
"image_url"
,
"image_url"
:
{
"url"
:
local_asset_server
.
url_for
(
"2560px-Gfp-wisconsin-madison-the-nature-boardwalk.jpg"
),
},
},
{
"type"
:
"text"
,
"text"
:
"What's in this image?"
},
{
"type"
:
"text"
,
"text"
:
"What's in this image?"
},
],
],
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment