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
cc977286
Unverified
Commit
cc977286
authored
Jun 03, 2025
by
Michael Goin
Committed by
GitHub
Jun 03, 2025
Browse files
Reduce logs in CLI scripts and plugin loader (#18970)
Signed-off-by:
mgoin
<
mgoin64@gmail.com
>
parent
17430e36
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
19 additions
and
15 deletions
+19
-15
vllm/benchmarks/datasets.py
vllm/benchmarks/datasets.py
+3
-3
vllm/benchmarks/latency.py
vllm/benchmarks/latency.py
+0
-2
vllm/benchmarks/throughput.py
vllm/benchmarks/throughput.py
+0
-1
vllm/compilation/backends.py
vllm/compilation/backends.py
+3
-3
vllm/plugins/__init__.py
vllm/plugins/__init__.py
+13
-6
No files found.
vllm/benchmarks/datasets.py
View file @
cc977286
...
...
@@ -328,9 +328,9 @@ class RandomDataset(BenchmarkDataset):
output_high
=
int
(
output_len
*
(
1
+
range_ratio
))
# Add logging for debugging
logger
.
info
(
"Sampling input_len from [%s, %s]"
,
input_low
,
input_high
)
logger
.
info
(
"Sampling
out
put_len from [%s, %s]
"
,
output_l
ow
,
output_high
)
logger
.
info
(
"Sampling
in
put_len from [%s, %s]
and
output_l
en from [%s, %s]"
,
input_low
,
input_high
,
output_low
,
output_high
)
input_lens
=
np
.
random
.
randint
(
input_low
,
input_high
+
1
,
...
...
vllm/benchmarks/latency.py
View file @
cc977286
...
...
@@ -78,7 +78,6 @@ def add_cli_args(parser: argparse.ArgumentParser):
def
main
(
args
:
argparse
.
Namespace
):
print
(
args
)
if
args
.
profile
and
not
envs
.
VLLM_TORCH_PROFILER_DIR
:
raise
OSError
(
"The environment variable 'VLLM_TORCH_PROFILER_DIR' is not set. "
...
...
@@ -101,7 +100,6 @@ def main(args: argparse.Namespace):
max_tokens
=
args
.
output_len
,
detokenize
=
not
args
.
disable_detokenize
,
)
print
(
sampling_params
)
dummy_prompt_token_ids
=
np
.
random
.
randint
(
10000
,
size
=
(
args
.
batch_size
,
args
.
input_len
))
...
...
vllm/benchmarks/throughput.py
View file @
cc977286
...
...
@@ -527,7 +527,6 @@ def main(args: argparse.Namespace):
validate_args
(
args
)
if
args
.
seed
is
None
:
args
.
seed
=
0
print
(
args
)
random
.
seed
(
args
.
seed
)
# Sample the requests.
tokenizer
=
AutoTokenizer
.
from_pretrained
(
...
...
vllm/compilation/backends.py
View file @
cc977286
...
...
@@ -31,13 +31,13 @@ def make_compiler(compilation_config: CompilationConfig) -> CompilerInterface:
if
compilation_config
.
use_inductor
:
if
envs
.
VLLM_USE_STANDALONE_COMPILE
and
is_torch_equal_or_newer
(
"2.8.0"
):
logger
.
info
(
"Using InductorStandaloneAdaptor"
)
logger
.
debug
(
"Using InductorStandaloneAdaptor"
)
return
InductorStandaloneAdaptor
()
else
:
logger
.
info
(
"Using InductorAdaptor"
)
logger
.
debug
(
"Using InductorAdaptor"
)
return
InductorAdaptor
()
else
:
logger
.
info
(
"Using EagerAdaptor"
)
logger
.
debug
(
"Using EagerAdaptor"
)
return
EagerAdaptor
()
...
...
vllm/plugins/__init__.py
View file @
cc977286
...
...
@@ -10,6 +10,8 @@ import vllm.envs as envs
logger
=
logging
.
getLogger
(
__name__
)
DEFAULT_PLUGINS_GROUP
=
'vllm.general_plugins'
# make sure one process only loads plugins once
plugins_loaded
=
False
...
...
@@ -28,19 +30,24 @@ def load_plugins_by_group(group: str) -> dict[str, Callable[[], Any]]:
logger
.
debug
(
"No plugins for group %s found."
,
group
)
return
{}
logger
.
info
(
"Available plugins for group %s:"
,
group
)
# Check if the only discovered plugin is the default one
is_default_group
=
(
group
==
DEFAULT_PLUGINS_GROUP
)
# Use INFO for non-default groups and DEBUG for the default group
log_level
=
logger
.
debug
if
is_default_group
else
logger
.
info
log_level
(
"Available plugins for group %s:"
,
group
)
for
plugin
in
discovered_plugins
:
log
ger
.
info
(
"- %s -> %s"
,
plugin
.
name
,
plugin
.
value
)
log
_level
(
"- %s -> %s"
,
plugin
.
name
,
plugin
.
value
)
if
allowed_plugins
is
None
:
log
ger
.
info
(
"All plugins in this group will be loaded. "
log
_level
(
"All plugins in this group will be loaded. "
"Set `VLLM_PLUGINS` to control which plugins to load."
)
plugins
=
dict
[
str
,
Callable
[[],
Any
]]()
for
plugin
in
discovered_plugins
:
if
allowed_plugins
is
None
or
plugin
.
name
in
allowed_plugins
:
if
allowed_plugins
is
not
None
:
log
ger
.
info
(
"Loading plugin %s"
,
plugin
.
name
)
log
_level
(
"Loading plugin %s"
,
plugin
.
name
)
try
:
func
=
plugin
.
load
()
...
...
@@ -80,7 +87,7 @@ def load_general_plugins():
# see https://docs.habana.ai/en/latest/PyTorch/Inference_on_PyTorch/Inference_Using_HPU_Graphs.html # noqa: E501
os
.
environ
[
'PT_HPU_ENABLE_LAZY_COLLECTIVES'
]
=
'true'
plugins
=
load_plugins_by_group
(
group
=
'vllm.general_plugins'
)
plugins
=
load_plugins_by_group
(
group
=
DEFAULT_PLUGINS_GROUP
)
# general plugins, we only need to execute the loaded functions
for
func
in
plugins
.
values
():
func
()
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