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 14, 05:30 UTC
[Misc] Redact ray runtime env before logging (#26302)
Signed-off-by: Rui Qiao <ruisearch42@gmail.com>
Rui Qiao committed
Oct 8, 2025 at 17:43 UTC
467a4f98f17b74b620963d6032c0e457900f8c8a
1 file changed
+7
-1
vllm/engine/arg_utils.py
+7
-1
@@ -1327,7 +1327,13 @@ class EngineArgs:
1327
import ray
1328
1329
ray_runtime_env = ray.get_runtime_context().runtime_env
1330
- logger.info("Using ray runtime env: %s", ray_runtime_env)
1330
+ # Avoid logging sensitive environment variables
1331
+ sanitized_env = ray_runtime_env.to_dict() if ray_runtime_env else {}
1332
+ if "env_vars" in sanitized_env:
1333
+ sanitized_env["env_vars"] = {
1334
+ k: "***" for k in sanitized_env["env_vars"]
1335
+ }
1336
+ logger.info("Using ray runtime env (env vars redacted): %s", sanitized_env)
1337
1338
# Get the current placement group if Ray is initialized and
1339
# we are in a Ray actor. If so, then the placement group will be