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 17, 00:30 UTC
[Misc] add logging level env var (#5045)
youkaichao committed
May 24, 2024 at 23:49 UTC
325c119961698c27d8d11d61d019a6d57c814c51
3 files changed
+9
-1
.github/ISSUE_TEMPLATE/400-bug report.yml
+2
@@ -59,6 +59,8 @@ body:
59
60
Please also paste or describe the results you observe instead of the expected results. If you observe an error, please paste the error message including the **full** traceback of the exception. It may be relevant to wrap error messages in ```` ```triple quotes blocks``` ````.
61
62
+ Please set the environment variable `export VLLM_LOGGING_LEVEL=DEBUG` to turn on more logging to help debugging potential issues.
63
+
64
If you experienced crashes or hangs, it would be helpful to run vllm with `export VLLM_TRACE_FUNCTION=1` . All the function calls in vllm will be recorded. Inspect these log files, and tell which function crashes or hangs.
65
placeholder: |
66
A clear and concise description of what the bug is.
vllm/envs.py
+5
@@ -22,6 +22,7 @@ if TYPE_CHECKING:
22
VLLM_DO_NOT_TRACK: bool = False
23
VLLM_USAGE_SOURCE: str = ""
24
VLLM_CONFIGURE_LOGGING: int = 1
25
+ VLLM_LOGGING_LEVEL: str = "INFO"
26
VLLM_LOGGING_CONFIG_PATH: Optional[str] = None
27
VLLM_TRACE_FUNCTION: int = 0
28
VLLM_ATTENTION_BACKEND: Optional[str] = None
@@ -178,6 +179,10 @@ environment_variables: Dict[str, Callable[[], Any]] = {
179
"VLLM_LOGGING_CONFIG_PATH":
180
lambda: os.getenv("VLLM_LOGGING_CONFIG_PATH"),
181
182
+ # this is used for configuring the default logging level
183
+ "VLLM_LOGGING_LEVEL":
184
+ lambda: os.getenv("VLLM_LOGGING_LEVEL", "INFO"),
185
+
186
# Trace function calls
187
# If set to 1, vllm will trace function calls
188
# Useful for debugging
vllm/logger.py
+2
-1
@@ -14,6 +14,7 @@ import vllm.envs as envs
14
15
VLLM_CONFIGURE_LOGGING = envs.VLLM_CONFIGURE_LOGGING
16
VLLM_LOGGING_CONFIG_PATH = envs.VLLM_LOGGING_CONFIG_PATH
17
+VLLM_LOGGING_LEVEL = envs.VLLM_LOGGING_LEVEL
18
19
_FORMAT = "%(levelname)s %(asctime)s %(filename)s:%(lineno)d] %(message)s"
20
_DATE_FORMAT = "%m-%d %H:%M:%S"
@@ -30,7 +31,7 @@ DEFAULT_LOGGING_CONFIG = {
31
"vllm": {
32
"class": "logging.StreamHandler",
33
"formatter": "vllm",
33
- "level": "INFO",
34
+ "level": VLLM_LOGGING_LEVEL,
35
"stream": "ext://sys.stdout",
36
},
37
},