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
ed344f41
Unverified
Commit
ed344f41
authored
Oct 16, 2025
by
Lukas Geiger
Committed by
GitHub
Oct 16, 2025
Browse files
Cleanup code after Python 3.10 upgrade (#26520)
Signed-off-by:
Lukas Geiger
<
lukas.geiger94@gmail.com
>
parent
e5192879
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
8 deletions
+2
-8
benchmarks/benchmark_serving_structured_output.py
benchmarks/benchmark_serving_structured_output.py
+2
-7
requirements/common.txt
requirements/common.txt
+0
-1
No files found.
benchmarks/benchmark_serving_structured_output.py
View file @
ed344f41
...
...
@@ -31,6 +31,7 @@ import time
import
uuid
import
warnings
from
collections.abc
import
AsyncGenerator
from
contextlib
import
nullcontext
from
dataclasses
import
dataclass
import
datasets
...
...
@@ -501,15 +502,9 @@ async def benchmark(
pbar
=
None
if
disable_tqdm
else
tqdm
(
total
=
len
(
input_requests
))
# This can be used once the minimum Python version is 3.10 or higher,
# and it will simplify the code in limited_request_func.
# semaphore = (asyncio.Semaphore(max_concurrency)
# if max_concurrency else contextlib.nullcontext())
semaphore
=
asyncio
.
Semaphore
(
max_concurrency
)
if
max_concurrency
else
None
semaphore
=
asyncio
.
Semaphore
(
max_concurrency
)
if
max_concurrency
else
nullcontext
()
async
def
limited_request_func
(
request_func_input
,
pbar
):
if
semaphore
is
None
:
return
await
request_func
(
request_func_input
=
request_func_input
,
pbar
=
pbar
)
async
with
semaphore
:
return
await
request_func
(
request_func_input
=
request_func_input
,
pbar
=
pbar
)
...
...
requirements/common.txt
View file @
ed344f41
...
...
@@ -31,7 +31,6 @@ partial-json-parser # used for parsing partial JSON outputs
pyzmq >= 25.0.0
msgspec
gguf >= 0.13.0
importlib_metadata; python_version < '3.10'
mistral_common[image,audio] >= 1.8.5
opencv-python-headless >= 4.11.0 # required for video IO
pyyaml
...
...
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