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 9, 17:06 UTC
[fix] add VLLM_OBJECT_STORAGE_SHM_BUFFER_NAME to compile factors (#32912)
Signed-off-by: dolpm <34420038+dolpm@users.noreply.github.com>
dolpm committed
Jan 23, 2026 at 14:53 UTC
0118cdcc02ae16a137645e2289bf41f5e3da9d80
2 files changed
+38
tests/config/test_config_utils.py
+37
@@ -164,3 +164,40 @@ def test_classes_are_types():
164
pass
165
166
assert endswith_fqname(LocalDummy, ".LocalDummy")
167
+
168
+
169
+def test_envs_compile_factors_stable():
170
+ """Test that envs.compile_factors() hash is stable across fresh initializations.
171
+
172
+ Uses subprocesses to ensure env vars with dynamic defaults (like UUIDs)
173
+ are freshly generated each time, verifying they're properly ignored.
174
+ """
175
+ import subprocess
176
+ import sys
177
+
178
+ code = """
179
+import sys
180
+import logging
181
+logging.disable(logging.CRITICAL)
182
+from vllm import envs
183
+from vllm.config.utils import hash_factors
184
+print(hash_factors(envs.compile_factors()))
185
+"""
186
+
187
+ def get_hash_in_subprocess():
188
+ result = subprocess.run(
189
+ [sys.executable, "-c", code],
190
+ capture_output=True,
191
+ text=True,
192
+ check=True,
193
+ env={**dict(__import__("os").environ), "VLLM_LOGGING_LEVEL": "ERROR"},
194
+ )
195
+ return result.stdout.strip()
196
+
197
+ hash1 = get_hash_in_subprocess()
198
+ hash2 = get_hash_in_subprocess()
199
+
200
+ assert hash1 == hash2, (
201
+ "compile_factors hash differs between fresh initializations - "
202
+ "dynamic env vars may not be properly ignored"
203
+ )
vllm/envs.py
+1
@@ -1735,6 +1735,7 @@ def compile_factors() -> dict[str, object]:
1735
"VLLM_MAX_AUDIO_CLIP_FILESIZE_MB",
1736
"VLLM_VIDEO_LOADER_BACKEND",
1737
"VLLM_MEDIA_CONNECTOR",
1738
+ "VLLM_OBJECT_STORAGE_SHM_BUFFER_NAME",
1739
"VLLM_ASSETS_CACHE",
1740
"VLLM_ASSETS_CACHE_MODEL_CLEAN",
1741
"VLLM_WORKER_MULTIPROC_METHOD",