Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
change
sglang
Commits
c550e52f
Unverified
Commit
c550e52f
authored
Mar 13, 2025
by
文峰
Committed by
GitHub
Mar 12, 2025
Browse files
Fix scheduler proctitle suffix is None (#4326)
Co-authored-by:
wenfeng.wf
<
wenfeng.wf@alibaba-inc.com
>
parent
e35a93fa
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
5 deletions
+8
-5
python/sglang/srt/managers/scheduler.py
python/sglang/srt/managers/scheduler.py
+8
-5
No files found.
python/sglang/srt/managers/scheduler.py
View file @
c550e52f
...
@@ -1677,9 +1677,16 @@ def run_scheduler_process(
...
@@ -1677,9 +1677,16 @@ def run_scheduler_process(
dp_rank
:
Optional
[
int
],
dp_rank
:
Optional
[
int
],
pipe_writer
,
pipe_writer
,
):
):
# Generate the prefix
if
dp_rank
is
None
:
prefix
=
f
" TP
{
tp_rank
}
"
else
:
prefix
=
f
" DP
{
dp_rank
}
TP
{
tp_rank
}
"
# Config the process
# Config the process
# kill_itself_when_parent_died() # This is disabled because it does not work for `--dp 2`
# kill_itself_when_parent_died() # This is disabled because it does not work for `--dp 2`
setproctitle
.
setproctitle
(
f
"sglang::scheduler
_
{
dp_rank
}
"
)
setproctitle
.
setproctitle
(
f
"sglang::scheduler
{
prefix
.
replace
(
' '
,
'_'
)
}
"
)
faulthandler
.
enable
()
faulthandler
.
enable
()
parent_process
=
psutil
.
Process
().
parent
()
parent_process
=
psutil
.
Process
().
parent
()
...
@@ -1688,10 +1695,6 @@ def run_scheduler_process(
...
@@ -1688,10 +1695,6 @@ def run_scheduler_process(
dp_rank
=
int
(
os
.
environ
[
"SGLANG_DP_RANK"
])
dp_rank
=
int
(
os
.
environ
[
"SGLANG_DP_RANK"
])
# Configure the logger
# Configure the logger
if
dp_rank
is
None
:
prefix
=
f
" TP
{
tp_rank
}
"
else
:
prefix
=
f
" DP
{
dp_rank
}
TP
{
tp_rank
}
"
configure_logger
(
server_args
,
prefix
=
prefix
)
configure_logger
(
server_args
,
prefix
=
prefix
)
suppress_other_loggers
()
suppress_other_loggers
()
...
...
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