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
718c391f
Unverified
Commit
718c391f
authored
Mar 05, 2025
by
Wenxuan Tan
Committed by
GitHub
Mar 05, 2025
Browse files
[Hoxfix] Fix incomplete token_to_kv_pool refactor (#4121)
parent
fc671f66
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
python/sglang/srt/managers/scheduler.py
python/sglang/srt/managers/scheduler.py
+2
-2
No files found.
python/sglang/srt/managers/scheduler.py
View file @
718c391f
...
@@ -484,7 +484,7 @@ class Scheduler:
...
@@ -484,7 +484,7 @@ class Scheduler:
logger
.
error
(
logger
.
error
(
f
"
{
self
.
cur_batch
.
batch_size
()
=
}
, "
f
"
{
self
.
cur_batch
.
batch_size
()
=
}
, "
f
"
{
self
.
cur_batch
.
reqs
=
}
, "
f
"
{
self
.
cur_batch
.
reqs
=
}
, "
f
"
{
self
.
token_to_kv_pool
.
available_size
()
=
}
, "
f
"
{
self
.
token_to_kv_pool
_allocator
.
available_size
()
=
}
, "
f
"
{
self
.
tree_cache
.
evictable_size
()
=
}
, "
f
"
{
self
.
tree_cache
.
evictable_size
()
=
}
, "
)
)
# Wait for some time so that the parent process can print the error.
# Wait for some time so that the parent process can print the error.
...
@@ -932,7 +932,7 @@ class Scheduler:
...
@@ -932,7 +932,7 @@ class Scheduler:
):
):
# During idle time, also collect metrics every 30 seconds.
# During idle time, also collect metrics every 30 seconds.
num_used
=
self
.
max_total_num_tokens
-
(
num_used
=
self
.
max_total_num_tokens
-
(
self
.
token_to_kv_pool
.
available_size
()
self
.
token_to_kv_pool
_allocator
.
available_size
()
+
self
.
tree_cache
.
evictable_size
()
+
self
.
tree_cache
.
evictable_size
()
)
)
num_running_reqs
=
len
(
self
.
running_batch
.
reqs
)
if
self
.
running_batch
else
0
num_running_reqs
=
len
(
self
.
running_batch
.
reqs
)
if
self
.
running_batch
else
0
...
...
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