mirror of
https://git.datalinker.icu/vllm-project/vllm.git
synced 2026-05-15 19:07:57 +08:00
[Misc] Reduce logs on startup (#18649)
Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk>
This commit is contained in:
parent
44073a7ac3
commit
503f8487c2
@ -62,10 +62,9 @@ class Fp8Config(QuantizationConfig):
|
|||||||
weight_block_size: Optional[list[int]] = None,
|
weight_block_size: Optional[list[int]] = None,
|
||||||
) -> None:
|
) -> None:
|
||||||
super().__init__()
|
super().__init__()
|
||||||
|
|
||||||
self.is_checkpoint_fp8_serialized = is_checkpoint_fp8_serialized
|
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:
|
if activation_scheme not in ACTIVATION_SCHEMES:
|
||||||
raise ValueError(
|
raise ValueError(
|
||||||
f"Unsupported activation scheme {activation_scheme}")
|
f"Unsupported activation scheme {activation_scheme}")
|
||||||
|
|||||||
@ -217,11 +217,8 @@ def resolve_current_platform_cls_qualname() -> str:
|
|||||||
platform_cls_qualname = func()
|
platform_cls_qualname = func()
|
||||||
if platform_cls_qualname is not None:
|
if platform_cls_qualname is not None:
|
||||||
activated_plugins.append(name)
|
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:
|
except Exception:
|
||||||
logger.exception("Failed to load platform plugin %s", name)
|
pass
|
||||||
|
|
||||||
activated_builtin_plugins = list(
|
activated_builtin_plugins = list(
|
||||||
set(activated_plugins) & set(builtin_platform_plugins.keys()))
|
set(activated_plugins) & set(builtin_platform_plugins.keys()))
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
import logging
|
import logging
|
||||||
import os
|
import os
|
||||||
from typing import Callable
|
from typing import Any, Callable
|
||||||
|
|
||||||
import torch
|
import torch
|
||||||
|
|
||||||
@ -14,7 +14,7 @@ logger = logging.getLogger(__name__)
|
|||||||
plugins_loaded = False
|
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
|
import sys
|
||||||
if sys.version_info < (3, 10):
|
if sys.version_info < (3, 10):
|
||||||
from importlib_metadata import entry_points
|
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:
|
if len(discovered_plugins) == 0:
|
||||||
logger.debug("No plugins for group %s found.", group)
|
logger.debug("No plugins for group %s found.", group)
|
||||||
return {}
|
return {}
|
||||||
|
|
||||||
logger.info("Available plugins for group %s:", group)
|
logger.info("Available plugins for group %s:", group)
|
||||||
for plugin in discovered_plugins:
|
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:
|
if allowed_plugins is None:
|
||||||
logger.info("all available plugins for group %s will be loaded.",
|
logger.info("All plugins in this group will be loaded. "
|
||||||
group)
|
"Set `VLLM_PLUGINS` to control which plugins to load.")
|
||||||
logger.info("set environment variable VLLM_PLUGINS to control"
|
|
||||||
" which plugins to load.")
|
plugins = dict[str, Callable[[], Any]]()
|
||||||
plugins = {}
|
|
||||||
for plugin in discovered_plugins:
|
for plugin in discovered_plugins:
|
||||||
if allowed_plugins is None or plugin.name in allowed_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:
|
try:
|
||||||
func = plugin.load()
|
func = plugin.load()
|
||||||
plugins[plugin.name] = func
|
plugins[plugin.name] = func
|
||||||
logger.info("plugin %s loaded.", plugin.name)
|
|
||||||
except Exception:
|
except Exception:
|
||||||
logger.exception("Failed to load plugin %s", plugin.name)
|
logger.exception("Failed to load plugin %s", plugin.name)
|
||||||
|
|
||||||
return plugins
|
return plugins
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user