[Feature] Warn about unrecognized environment variables (#33581)
Signed-off-by: Gregory Shtrasberg <Gregory.Shtrasberg@amd.com>
This commit is contained in:
committed by
GitHub
parent
578977bb5e
commit
f0ca0671c7
@@ -1606,6 +1606,15 @@ def is_set(name: str):
|
||||
raise AttributeError(f"module {__name__!r} has no attribute {name!r}")
|
||||
|
||||
|
||||
def validate_environ(hard_fail: bool) -> None:
|
||||
for env in os.environ:
|
||||
if env.startswith("VLLM_") and env not in environment_variables:
|
||||
if hard_fail:
|
||||
raise ValueError(f"Unknown vLLM environment variable detected: {env}")
|
||||
else:
|
||||
logger.warning("Unknown vLLM environment variable detected: %s", env)
|
||||
|
||||
|
||||
def compile_factors() -> dict[str, object]:
|
||||
"""Return env vars used for torch.compile cache keys.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user