guidellm 0.3.0a20__py3-none-any.whl → 0.3.0a22__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of guidellm might be problematic. Click here for more details.
- guidellm/backend/backend.py +10 -0
- guidellm/backend/openai.py +10 -1
- {guidellm-0.3.0a20.dist-info → guidellm-0.3.0a22.dist-info}/METADATA +1 -1
- {guidellm-0.3.0a20.dist-info → guidellm-0.3.0a22.dist-info}/RECORD +8 -8
- {guidellm-0.3.0a20.dist-info → guidellm-0.3.0a22.dist-info}/WHEEL +0 -0
- {guidellm-0.3.0a20.dist-info → guidellm-0.3.0a22.dist-info}/entry_points.txt +0 -0
- {guidellm-0.3.0a20.dist-info → guidellm-0.3.0a22.dist-info}/licenses/LICENSE +0 -0
- {guidellm-0.3.0a20.dist-info → guidellm-0.3.0a22.dist-info}/top_level.txt +0 -0
guidellm/backend/backend.py
CHANGED
|
@@ -110,6 +110,14 @@ class Backend(ABC):
|
|
|
110
110
|
"""
|
|
111
111
|
...
|
|
112
112
|
|
|
113
|
+
@abstractmethod
|
|
114
|
+
async def reset(self) -> None:
|
|
115
|
+
"""
|
|
116
|
+
Reset the connection object. This is useful for backends that
|
|
117
|
+
reuse connections or have state that needs to be cleared.
|
|
118
|
+
"""
|
|
119
|
+
...
|
|
120
|
+
|
|
113
121
|
async def validate(self):
|
|
114
122
|
"""
|
|
115
123
|
Handle final setup and validate the backend is ready for use.
|
|
@@ -126,6 +134,8 @@ class Backend(ABC):
|
|
|
126
134
|
): # type: ignore[attr-defined]
|
|
127
135
|
pass
|
|
128
136
|
|
|
137
|
+
await self.reset()
|
|
138
|
+
|
|
129
139
|
@abstractmethod
|
|
130
140
|
async def check_setup(self):
|
|
131
141
|
"""
|
guidellm/backend/openai.py
CHANGED
|
@@ -157,6 +157,15 @@ class OpenAIHTTPBackend(Backend):
|
|
|
157
157
|
"chat_completions_path": CHAT_COMPLETIONS_PATH,
|
|
158
158
|
}
|
|
159
159
|
|
|
160
|
+
async def reset(self) -> None:
|
|
161
|
+
"""
|
|
162
|
+
Reset the connection object. This is useful for backends that
|
|
163
|
+
reuse connections or have state that needs to be cleared.
|
|
164
|
+
For this backend, it closes the async client if it exists.
|
|
165
|
+
"""
|
|
166
|
+
if self._async_client is not None:
|
|
167
|
+
await self._async_client.aclose()
|
|
168
|
+
|
|
160
169
|
async def check_setup(self):
|
|
161
170
|
"""
|
|
162
171
|
Check if the backend is setup correctly and can be used for requests.
|
|
@@ -361,7 +370,7 @@ class OpenAIHTTPBackend(Backend):
|
|
|
361
370
|
|
|
362
371
|
:return: The async HTTP client.
|
|
363
372
|
"""
|
|
364
|
-
if self._async_client is None:
|
|
373
|
+
if self._async_client is None or self._async_client.is_closed:
|
|
365
374
|
client = httpx.AsyncClient(
|
|
366
375
|
http2=self.http2,
|
|
367
376
|
timeout=self.timeout,
|
|
@@ -4,8 +4,8 @@ guidellm/config.py,sha256=-JuirSy1EDkQnXHfLKBV_PeQGFwi5nL088BKeCgh9Xo,6087
|
|
|
4
4
|
guidellm/logger.py,sha256=O4sU2QKHn_swJIEmayiEt6nIXzGHGmXqZ_Mg8CdIE5Q,2609
|
|
5
5
|
guidellm/version.py,sha256=XZeUwR24DzG1AjuKV0s8cRyc0Xv8cPiqXYSZTt7xQVg,127
|
|
6
6
|
guidellm/backend/__init__.py,sha256=nQmxVNG9cDdNbY0NwjXxIRV4oyZKIhb6cGyuXOakFnk,489
|
|
7
|
-
guidellm/backend/backend.py,sha256=
|
|
8
|
-
guidellm/backend/openai.py,sha256=
|
|
7
|
+
guidellm/backend/backend.py,sha256=6jgfvUGbT46e7bEu5IZjm6YO3mVtme-vthJVuZBFEgQ,9227
|
|
8
|
+
guidellm/backend/openai.py,sha256=7cBkB9d6atxE_DkMZsGtE20SQM1Lkpsp_iyyW-mfq6Y,25580
|
|
9
9
|
guidellm/backend/response.py,sha256=ipv5amHOGHK0fW4rOIt1d8Vj1yXTizSh3Ux5MaN96KY,5139
|
|
10
10
|
guidellm/benchmark/__init__.py,sha256=t5dEG93mmUtfQq6EycAG8awm28srOswlqsLp1hLZBQY,1775
|
|
11
11
|
guidellm/benchmark/aggregator.py,sha256=UejpeLT2qAJDX4tgKHx-IUGxT6L4YP5bCq1vwSoxtKk,31312
|
|
@@ -44,9 +44,9 @@ guidellm/utils/hf_datasets.py,sha256=C99cB4StbhjC8XtnzLLGe6A0TYrs63EapQZJQmQr8dI
|
|
|
44
44
|
guidellm/utils/hf_transformers.py,sha256=3iF40l02VEWOcS8kasO8TSws0Lp3cE-NyiqoB9GnHuA,1021
|
|
45
45
|
guidellm/utils/random.py,sha256=elA8HZ3AIN5T2pa7cgq35OVK__0SQmZVS4IzxJaOpvw,1310
|
|
46
46
|
guidellm/utils/text.py,sha256=Xn6JUWy3B7gi1l0UkBFLizV9fnZ_kM3OQDMLlIZqsgE,6347
|
|
47
|
-
guidellm-0.3.
|
|
48
|
-
guidellm-0.3.
|
|
49
|
-
guidellm-0.3.
|
|
50
|
-
guidellm-0.3.
|
|
51
|
-
guidellm-0.3.
|
|
52
|
-
guidellm-0.3.
|
|
47
|
+
guidellm-0.3.0a22.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
48
|
+
guidellm-0.3.0a22.dist-info/METADATA,sha256=u_JxrxcSxz8WqQZNhYUY-7Kj-rk26DhbjY95DrZ6WDs,18061
|
|
49
|
+
guidellm-0.3.0a22.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
50
|
+
guidellm-0.3.0a22.dist-info/entry_points.txt,sha256=DzLFEg47fF7qY1b-9laPz9jg0KSKJ1_D9TbF93kLz_E,51
|
|
51
|
+
guidellm-0.3.0a22.dist-info/top_level.txt,sha256=EXRGjnvFtL6MeZTe0tnHRMYcEWUW3vEqoG2zO7vFOtk,9
|
|
52
|
+
guidellm-0.3.0a22.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|