[Core][Easy] Use envs.__getattr__ for all Unify to environment variable access (#26810)

Signed-off-by: Jialin Ouyang <Jialin.Ouyang@gmail.com>
This commit is contained in:
Jialin Ouyang
2025-10-15 01:41:18 +00:00
committed by GitHub
parent 2dcd12d357
commit 07ca70af8d
4 changed files with 10 additions and 11 deletions
+3 -3
View File
@@ -7,7 +7,7 @@ from collections import Counter
from contextlib import suppress
from typing import Any
from vllm.envs import VLLM_GC_DEBUG
import vllm.envs as envs
from vllm.logger import init_logger
logger = init_logger(__name__)
@@ -36,7 +36,7 @@ class GCDebugConfig:
self.top_objects = json_conf.get("top_objects", -1)
except Exception:
self.enabled = False
logger.error("Failed to parse VLLM_GC_DEBUG(%s)", VLLM_GC_DEBUG)
logger.error("Failed to parse VLLM_GC_DEBUG(%s)", envs.VLLM_GC_DEBUG)
logger.info("GC Debug Config. %s", str(self))
def __repr__(self) -> str:
@@ -93,7 +93,7 @@ def maybe_attach_gc_debug_callback() -> None:
"""
Attached a callback for GC debug when VLLM_GC_DEBUG is enabled.
"""
config = GCDebugConfig(VLLM_GC_DEBUG)
config = GCDebugConfig(envs.VLLM_GC_DEBUG)
if config.enabled:
debugger: GCDebugger = GCDebugger(config)