A high-throughput and memory-efficient inference and serving engine for LLMs
Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git
Synced Nov 15, 07:15 UTC
Reduce logs in CLI scripts and plugin loader (#18970)
Signed-off-by: mgoin <mgoin64@gmail.com>
Michael Goin committed
Jun 3, 2025 at 02:00 UTC
cc977286e7a4350183aeef873858fe0dc6774740
5 files changed
+19
-15
vllm/benchmarks/datasets.py
+3
-3
@@ -328,9 +328,9 @@ class RandomDataset(BenchmarkDataset):
328
output_high = int(output_len * (1 + range_ratio))
329
330
# Add logging for debugging
331
- logger.info("Sampling input_len from [%s, %s]", input_low, input_high)
332
- logger.info("Sampling output_len from [%s, %s]", output_low,
333
- output_high)
331
+ logger.info(
332
+ "Sampling input_len from [%s, %s] and output_len from [%s, %s]",
333
+ input_low, input_high, output_low, output_high)
334
335
input_lens = np.random.randint(input_low,
336
input_high + 1,
vllm/benchmarks/latency.py
-2
@@ -78,7 +78,6 @@ def add_cli_args(parser: argparse.ArgumentParser):
78
79
80
def main(args: argparse.Namespace):
81
- print(args)
81
if args.profile and not envs.VLLM_TORCH_PROFILER_DIR:
82
raise OSError(
83
"The environment variable 'VLLM_TORCH_PROFILER_DIR' is not set. "
@@ -101,7 +100,6 @@ def main(args: argparse.Namespace):
100
max_tokens=args.output_len,
101
detokenize=not args.disable_detokenize,
102
)
104
- print(sampling_params)
103
dummy_prompt_token_ids = np.random.randint(10000,
104
size=(args.batch_size,
105
args.input_len))
vllm/benchmarks/throughput.py
-1
@@ -527,7 +527,6 @@ def main(args: argparse.Namespace):
527
validate_args(args)
528
if args.seed is None:
529
args.seed = 0
530
- print(args)
530
random.seed(args.seed)
531
# Sample the requests.
532
tokenizer = AutoTokenizer.from_pretrained(
vllm/compilation/backends.py
+3
-3
@@ -31,13 +31,13 @@ def make_compiler(compilation_config: CompilationConfig) -> CompilerInterface:
31
if compilation_config.use_inductor:
32
if envs.VLLM_USE_STANDALONE_COMPILE and is_torch_equal_or_newer(
33
"2.8.0"):
34
- logger.info("Using InductorStandaloneAdaptor")
34
+ logger.debug("Using InductorStandaloneAdaptor")
35
return InductorStandaloneAdaptor()
36
else:
37
- logger.info("Using InductorAdaptor")
37
+ logger.debug("Using InductorAdaptor")
38
return InductorAdaptor()
39
else:
40
- logger.info("Using EagerAdaptor")
40
+ logger.debug("Using EagerAdaptor")
41
return EagerAdaptor()
42
43
vllm/plugins/__init__.py
+13
-6
@@ -10,6 +10,8 @@ import vllm.envs as envs
10
11
logger = logging.getLogger(__name__)
12
13
+DEFAULT_PLUGINS_GROUP = 'vllm.general_plugins'
14
+
15
# make sure one process only loads plugins once
16
plugins_loaded = False
17
@@ -28,19 +30,24 @@ def load_plugins_by_group(group: str) -> dict[str, Callable[[], Any]]:
30
logger.debug("No plugins for group %s found.", group)
31
return {}
32
31
- logger.info("Available plugins for group %s:", group)
33
+ # Check if the only discovered plugin is the default one
34
+ is_default_group = (group == DEFAULT_PLUGINS_GROUP)
35
+ # Use INFO for non-default groups and DEBUG for the default group
36
+ log_level = logger.debug if is_default_group else logger.info
37
+
38
+ log_level("Available plugins for group %s:", group)
39
for plugin in discovered_plugins:
33
- logger.info("- %s -> %s", plugin.name, plugin.value)
40
+ log_level("- %s -> %s", plugin.name, plugin.value)
41
42
if allowed_plugins is None:
36
- logger.info("All plugins in this group will be loaded. "
37
- "Set `VLLM_PLUGINS` to control which plugins to load.")
43
+ log_level("All plugins in this group will be loaded. "
44
+ "Set `VLLM_PLUGINS` to control which plugins to load.")
45
46
plugins = dict[str, Callable[[], Any]]()
47
for plugin in discovered_plugins:
48
if allowed_plugins is None or plugin.name in allowed_plugins:
49
if allowed_plugins is not None:
43
- logger.info("Loading plugin %s", plugin.name)
50
+ log_level("Loading plugin %s", plugin.name)
51
52
try:
53
func = plugin.load()
@@ -80,7 +87,7 @@ def load_general_plugins():
87
# see https://docs.habana.ai/en/latest/PyTorch/Inference_on_PyTorch/Inference_Using_HPU_Graphs.html # noqa: E501
88
os.environ['PT_HPU_ENABLE_LAZY_COLLECTIVES'] = 'true'
89
83
- plugins = load_plugins_by_group(group='vllm.general_plugins')
90
+ plugins = load_plugins_by_group(group=DEFAULT_PLUGINS_GROUP)
91
# general plugins, we only need to execute the loaded functions
92
for func in plugins.values():
93
func()