We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7d9ffa2 commit ea9fa16Copy full SHA for ea9fa16
tests/utils.py
@@ -11,6 +11,7 @@
11
12
import openai
13
import requests
14
+from huggingface_hub import snapshot_download
15
from transformers import AutoTokenizer
16
from typing_extensions import ParamSpec
17
@@ -64,6 +65,10 @@ def __init__(self,
64
65
env_dict: Optional[Dict[str, str]] = None,
66
auto_port: bool = True,
67
max_wait_seconds: Optional[float] = None) -> None:
68
+ if not model.startswith("/"):
69
+ # download the model if it's not a local path
70
+ # to exclude the model download time from the server start time
71
+ model = snapshot_download(model)
72
if auto_port:
73
if "-p" in cli_args or "--port" in cli_args:
74
raise ValueError("You have manually specified the port"
0 commit comments