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
a7a0a688
Unverified
Commit
a7a0a688
authored
Oct 30, 2024
by
Byron Hsu
Committed by
GitHub
Oct 30, 2024
Browse files
Make decode log interval configurable (#1847)
parent
2d4ce1b7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
1 deletion
+8
-1
python/sglang/srt/managers/scheduler.py
python/sglang/srt/managers/scheduler.py
+1
-1
python/sglang/srt/server_args.py
python/sglang/srt/server_args.py
+7
-0
No files found.
python/sglang/srt/managers/scheduler.py
View file @
a7a0a688
...
...
@@ -919,7 +919,7 @@ class Scheduler:
self
.
token_to_kv_pool
.
free_group_end
()
self
.
forward_ct_decode
=
(
self
.
forward_ct_decode
+
1
)
%
(
1
<<
30
)
if
self
.
tp_rank
==
0
and
self
.
forward_ct_decode
%
40
==
0
:
if
self
.
tp_rank
==
0
and
self
.
forward_ct_decode
%
self
.
server_args
.
decode_log_interval
==
0
:
self
.
print_decode_stats
()
def
add_logprob_return_values
(
...
...
python/sglang/srt/server_args.py
View file @
a7a0a688
...
...
@@ -63,6 +63,7 @@ class ServerArgs:
stream_interval
:
int
=
1
random_seed
:
Optional
[
int
]
=
None
constrained_json_whitespace_pattern
:
Optional
[
str
]
=
None
decode_log_interval
:
int
=
40
# Logging
log_level
:
str
=
"info"
...
...
@@ -436,6 +437,12 @@ class ServerArgs:
default
=
ServerArgs
.
watchdog_timeout
,
help
=
"Set watchdog timeout in seconds. If a forward batch takes longer than this, the server will crash to prevent hanging."
,
)
parser
.
add_argument
(
"--decode-log-interval"
,
type
=
int
,
default
=
ServerArgs
.
decode_log_interval
,
help
=
"The log interval of decode batch"
)
# Data parallelism
parser
.
add_argument
(
...
...
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