[fix] add VLLM_OBJECT_STORAGE_SHM_BUFFER_NAME to compile factors (#32912)
Signed-off-by: dolpm <34420038+dolpm@users.noreply.github.com>
This commit is contained in:
@@ -164,3 +164,40 @@ def test_classes_are_types():
|
|||||||
pass
|
pass
|
||||||
|
|
||||||
assert endswith_fqname(LocalDummy, ".LocalDummy")
|
assert endswith_fqname(LocalDummy, ".LocalDummy")
|
||||||
|
|
||||||
|
|
||||||
|
def test_envs_compile_factors_stable():
|
||||||
|
"""Test that envs.compile_factors() hash is stable across fresh initializations.
|
||||||
|
|
||||||
|
Uses subprocesses to ensure env vars with dynamic defaults (like UUIDs)
|
||||||
|
are freshly generated each time, verifying they're properly ignored.
|
||||||
|
"""
|
||||||
|
import subprocess
|
||||||
|
import sys
|
||||||
|
|
||||||
|
code = """
|
||||||
|
import sys
|
||||||
|
import logging
|
||||||
|
logging.disable(logging.CRITICAL)
|
||||||
|
from vllm import envs
|
||||||
|
from vllm.config.utils import hash_factors
|
||||||
|
print(hash_factors(envs.compile_factors()))
|
||||||
|
"""
|
||||||
|
|
||||||
|
def get_hash_in_subprocess():
|
||||||
|
result = subprocess.run(
|
||||||
|
[sys.executable, "-c", code],
|
||||||
|
capture_output=True,
|
||||||
|
text=True,
|
||||||
|
check=True,
|
||||||
|
env={**dict(__import__("os").environ), "VLLM_LOGGING_LEVEL": "ERROR"},
|
||||||
|
)
|
||||||
|
return result.stdout.strip()
|
||||||
|
|
||||||
|
hash1 = get_hash_in_subprocess()
|
||||||
|
hash2 = get_hash_in_subprocess()
|
||||||
|
|
||||||
|
assert hash1 == hash2, (
|
||||||
|
"compile_factors hash differs between fresh initializations - "
|
||||||
|
"dynamic env vars may not be properly ignored"
|
||||||
|
)
|
||||||
|
|||||||
@@ -1735,6 +1735,7 @@ def compile_factors() -> dict[str, object]:
|
|||||||
"VLLM_MAX_AUDIO_CLIP_FILESIZE_MB",
|
"VLLM_MAX_AUDIO_CLIP_FILESIZE_MB",
|
||||||
"VLLM_VIDEO_LOADER_BACKEND",
|
"VLLM_VIDEO_LOADER_BACKEND",
|
||||||
"VLLM_MEDIA_CONNECTOR",
|
"VLLM_MEDIA_CONNECTOR",
|
||||||
|
"VLLM_OBJECT_STORAGE_SHM_BUFFER_NAME",
|
||||||
"VLLM_ASSETS_CACHE",
|
"VLLM_ASSETS_CACHE",
|
||||||
"VLLM_ASSETS_CACHE_MODEL_CLEAN",
|
"VLLM_ASSETS_CACHE_MODEL_CLEAN",
|
||||||
"VLLM_WORKER_MULTIPROC_METHOD",
|
"VLLM_WORKER_MULTIPROC_METHOD",
|
||||||
|
|||||||
Reference in New Issue
Block a user