vllm.utils.system_utils ¶
_add_prefix ¶
Add colored prefix to file output for log decoration.
Source code in vllm/utils/system_utils.py
decorate_logs ¶
decorate_logs(process_name: str | None = None) -> None
Decorate stdout/stderr with process name and PID prefix.
Source code in vllm/utils/system_utils.py
set_env_var ¶
Temporarily set an environment variable.
Source code in vllm/utils/system_utils.py
set_process_title ¶
Set the current process title with optional suffix.
Source code in vllm/utils/system_utils.py
unique_filepath ¶
Generate a unique file path by trying incrementing integers.
Note: This function has a TOCTOU race condition. Caller should use atomic operations (e.g., open with 'x' mode) when creating the file to ensure thread safety.
Source code in vllm/utils/system_utils.py
update_environment_variables ¶
Update multiple environment variables with logging.