[Frontend] DP Supervisor (#40841)
Signed-off-by: yewentao256 <zhyanwentao@126.com> Signed-off-by: Robert Shaw <robertgshaw2@gmail.com> Signed-off-by: Robert Shaw <114415538+robertgshaw2-redhat@users.noreply.github.com> Co-authored-by: robertgshaw2-redhat <robertgshaw2@gmail.com> Co-authored-by: Robert Shaw <114415538+robertgshaw2-redhat@users.noreply.github.com> Co-authored-by: Nick Hill <nickhill123@gmail.com>
This commit is contained in:
co-authored by
robertgshaw2-redhat
Robert Shaw
Nick Hill
parent
60af5c16ee
commit
0ddd7dd656
@@ -234,12 +234,17 @@ def _add_prefix(file: TextIO, worker_name: str, pid: int) -> None:
|
||||
file.write = write_with_prefix # type: ignore[method-assign]
|
||||
|
||||
|
||||
def decorate_logs(process_name: str | None = None) -> None:
|
||||
def decorate_logs(
|
||||
process_name: str | None = None, *, skip_if_decorated: bool = False
|
||||
) -> None:
|
||||
"""Decorate stdout/stderr with process name and PID prefix."""
|
||||
# Respect VLLM_CONFIGURE_LOGGING environment variable
|
||||
if not envs.VLLM_CONFIGURE_LOGGING:
|
||||
return
|
||||
|
||||
if skip_if_decorated and hasattr(sys.stdout, "_original_write"):
|
||||
return
|
||||
|
||||
if process_name is None:
|
||||
process_name = get_mp_context().current_process().name
|
||||
|
||||
|
||||
Reference in New Issue
Block a user