Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenDAS
vllm_cscc
Commits
8d6a89df
Unverified
Commit
8d6a89df
authored
Nov 25, 2025
by
Michael Goin
Committed by
GitHub
Nov 25, 2025
Browse files
[UX] Suppress gloo log spam (#29250)
Signed-off-by:
mgoin
<
mgoin64@gmail.com
>
parent
56531b79
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
64 additions
and
27 deletions
+64
-27
vllm/distributed/parallel_state.py
vllm/distributed/parallel_state.py
+3
-1
vllm/distributed/utils.py
vllm/distributed/utils.py
+28
-26
vllm/utils/system_utils.py
vllm/utils/system_utils.py
+33
-0
No files found.
vllm/distributed/parallel_state.py
View file @
8d6a89df
...
...
@@ -51,6 +51,7 @@ from vllm.distributed.utils import StatelessProcessGroup
from
vllm.logger
import
init_logger
from
vllm.utils.import_utils
import
resolve_obj_by_qualname
from
vllm.utils.network_utils
import
get_distributed_init_method
from
vllm.utils.system_utils
import
suppress_stdout
from
vllm.utils.torch_utils
import
(
direct_register_custom_op
,
supports_custom_op
,
...
...
@@ -329,6 +330,7 @@ class GroupCoordinator:
)
# a group with `gloo` backend, to allow direct coordination between
# processes through the CPU.
with
suppress_stdout
():
cpu_group
=
torch
.
distributed
.
new_group
(
ranks
,
backend
=
"gloo"
)
if
self
.
rank
in
ranks
:
self
.
ranks
=
ranks
...
...
vllm/distributed/utils.py
View file @
8d6a89df
...
...
@@ -30,6 +30,7 @@ from torch.distributed.rendezvous import rendezvous
import
vllm.envs
as
envs
from
vllm.logger
import
init_logger
from
vllm.utils.network_utils
import
get_tcp_uri
from
vllm.utils.system_utils
import
suppress_stdout
from
vllm.utils.torch_utils
import
is_torch_equal_or_newer
logger
=
init_logger
(
__name__
)
...
...
@@ -427,6 +428,7 @@ def init_gloo_process_group(
Stateless init ProcessGroup with gloo backend compatible with
different torch versions.
"""
with
suppress_stdout
():
if
is_torch_equal_or_newer
(
"2.6"
):
pg
=
ProcessGroup
(
prefix_store
,
...
...
vllm/utils/system_utils.py
View file @
8d6a89df
...
...
@@ -56,6 +56,39 @@ def set_env_var(key: str, value: str) -> Iterator[None]:
os
.
environ
[
key
]
=
old
@
contextlib
.
contextmanager
def
suppress_stdout
():
"""
Suppress stdout from C libraries at the file descriptor level.
Only suppresses stdout, not stderr, to preserve error messages.
Suppression is disabled when VLLM_LOGGING_LEVEL is set to DEBUG.
Example:
with suppress_stdout():
# C library calls that would normally print to stdout
torch.distributed.new_group(ranks, backend="gloo")
"""
# Don't suppress if logging level is DEBUG
if
envs
.
VLLM_LOGGING_LEVEL
==
"DEBUG"
:
yield
return
stdout_fd
=
sys
.
stdout
.
fileno
()
stdout_dup
=
os
.
dup
(
stdout_fd
)
devnull_fd
=
os
.
open
(
os
.
devnull
,
os
.
O_WRONLY
)
try
:
sys
.
stdout
.
flush
()
os
.
dup2
(
devnull_fd
,
stdout_fd
)
yield
finally
:
sys
.
stdout
.
flush
()
os
.
dup2
(
stdout_dup
,
stdout_fd
)
os
.
close
(
stdout_dup
)
os
.
close
(
devnull_fd
)
# File path utilities
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment