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
ea9fa160
Unverified
Commit
ea9fa160
authored
Aug 24, 2024
by
youkaichao
Committed by
GitHub
Aug 24, 2024
Browse files
[ci][test] exclude model download time in server start time (#7834)
parent
7d9ffa2a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
0 deletions
+5
-0
tests/utils.py
tests/utils.py
+5
-0
No files found.
tests/utils.py
View file @
ea9fa160
...
...
@@ -11,6 +11,7 @@ from typing import Any, Callable, Dict, List, Optional
import
openai
import
requests
from
huggingface_hub
import
snapshot_download
from
transformers
import
AutoTokenizer
from
typing_extensions
import
ParamSpec
...
...
@@ -64,6 +65,10 @@ class RemoteOpenAIServer:
env_dict
:
Optional
[
Dict
[
str
,
str
]]
=
None
,
auto_port
:
bool
=
True
,
max_wait_seconds
:
Optional
[
float
]
=
None
)
->
None
:
if
not
model
.
startswith
(
"/"
):
# download the model if it's not a local path
# to exclude the model download time from the server start time
model
=
snapshot_download
(
model
)
if
auto_port
:
if
"-p"
in
cli_args
or
"--port"
in
cli_args
:
raise
ValueError
(
"You have manually specified the port"
...
...
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