[Feat] Allow custom naming of vLLM processes (#21445)
Signed-off-by: chaunceyjiang <chaunceyjiang@gmail.com>
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user