From 3496274663d3c442446b4f5000af006cc28d715c Mon Sep 17 00:00:00 2001 From: Ning Xie Date: Fri, 22 Aug 2025 03:49:09 +0800 Subject: [PATCH] [Misc] Convert VLLM_TORCH_PROFILER_DIR path to absolute (#23191) Signed-off-by: Andy Xie --- vllm/envs.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/vllm/envs.py b/vllm/envs.py index 70068cca66..a844aa8af6 100755 --- a/vllm/envs.py +++ b/vllm/envs.py @@ -673,7 +673,8 @@ environment_variables: dict[str, Callable[[], Any]] = { # Note that it must be an absolute path. "VLLM_TORCH_PROFILER_DIR": lambda: (None if os.getenv("VLLM_TORCH_PROFILER_DIR", None) is None else os - .path.expanduser(os.getenv("VLLM_TORCH_PROFILER_DIR", "."))), + .path.abspath(os.path.expanduser(os.getenv( + "VLLM_TORCH_PROFILER_DIR", ".")))), # Enable torch profiler to record shapes if set # VLLM_TORCH_PROFILER_RECORD_SHAPES=1. If not set, torch profiler will