[Misc] Reduce logs on startup (#18649)

Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk>
This commit is contained in:
Cyrus Leung
2025-05-25 14:03:53 +08:00
committed by GitHub
parent 44073a7ac3
commit 503f8487c2
3 changed files with 16 additions and 16 deletions

View File

@ -62,10 +62,9 @@ class Fp8Config(QuantizationConfig):
weight_block_size: Optional[list[int]] = None,
) -> None:
super().__init__()
self.is_checkpoint_fp8_serialized = is_checkpoint_fp8_serialized
if is_checkpoint_fp8_serialized:
logger.warning("Detected fp8 checkpoint. Please note that the "
"format is experimental and subject to change.")
if activation_scheme not in ACTIVATION_SCHEMES:
raise ValueError(
f"Unsupported activation scheme {activation_scheme}")

View File

@ -217,11 +217,8 @@ def resolve_current_platform_cls_qualname() -> str:
platform_cls_qualname = func()
if platform_cls_qualname is not None:
activated_plugins.append(name)
logger.info("Platform plugin %s loaded.", name)
logger.warning(
"Platform plugin %s function's return value is None", name)
except Exception:
logger.exception("Failed to load platform plugin %s", name)
pass
activated_builtin_plugins = list(
set(activated_plugins) & set(builtin_platform_plugins.keys()))

View File

@ -2,7 +2,7 @@
import logging
import os
from typing import Callable
from typing import Any, Callable
import torch
@ -14,7 +14,7 @@ logger = logging.getLogger(__name__)
plugins_loaded = False
def load_plugins_by_group(group: str) -> dict[str, Callable]:
def load_plugins_by_group(group: str) -> dict[str, Callable[[], Any]]:
import sys
if sys.version_info < (3, 10):
from importlib_metadata import entry_points
@ -27,23 +27,27 @@ def load_plugins_by_group(group: str) -> dict[str, Callable]:
if len(discovered_plugins) == 0:
logger.debug("No plugins for group %s found.", group)
return {}
logger.info("Available plugins for group %s:", group)
for plugin in discovered_plugins:
logger.info("name=%s, value=%s", plugin.name, plugin.value)
logger.info("- %s -> %s", plugin.name, plugin.value)
if allowed_plugins is None:
logger.info("all available plugins for group %s will be loaded.",
group)
logger.info("set environment variable VLLM_PLUGINS to control"
" which plugins to load.")
plugins = {}
logger.info("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:
logger.info("Loading plugin %s", plugin.name)
try:
func = plugin.load()
plugins[plugin.name] = func
logger.info("plugin %s loaded.", plugin.name)
except Exception:
logger.exception("Failed to load plugin %s", plugin.name)
return plugins