[Feat] Allow custom naming of vLLM processes (#21445)

Signed-off-by: chaunceyjiang <chaunceyjiang@gmail.com>
This commit is contained in:
Chauncey
2025-07-24 03:15:23 -07:00
committed by GitHub
parent 73e3949d07
commit 6da0078523
10 changed files with 46 additions and 17 deletions
+14
View File
@@ -58,6 +58,7 @@ import numpy as np
import numpy.typing as npt
import psutil
import regex as re
import setproctitle
import torch
import torch.types
import yaml
@@ -3278,3 +3279,16 @@ def has_deep_gemm() -> bool:
"""Whether the optional `deep_gemm` package is available."""
return _has_module("deep_gemm")
def bind_process_name(name: str, suffix: str = "") -> None:
"""Bind the process name to a specific name with an optional suffix.
Args:
name: The base name to bind the process to.
suffix: An optional suffix to append to the base name.
"""
name = f"{envs.VLLM_PROCESS_NAME_PREFIX}::{name}"
if suffix:
name = f"{name}_{suffix}"
setproctitle.setproctitle(name)