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
norm
vllm
Commits
526df28f
"vscode:/vscode.git/clone" did not exist on "2e4dc3e25d6abaf5f15d7e5c62db75a8bd63f915"
Unverified
Commit
526df28f
authored
Jun 26, 2023
by
Woosuk Kwon
Committed by
GitHub
Jun 26, 2023
Browse files
[BugFix] Fix a bug in counting running sequences (#266)
parent
2cf1a333
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
vllm/core/scheduler.py
vllm/core/scheduler.py
+6
-2
No files found.
vllm/core/scheduler.py
View file @
526df28f
...
...
@@ -156,7 +156,9 @@ class Scheduler:
# The total number of sequences in the RUNNING state should not
# exceed the maximum number of sequences.
num_new_seqs
=
seq_group
.
num_seqs
(
status
=
SequenceStatus
.
SWAPPED
)
num_curr_seqs
=
len
(
self
.
running
)
num_curr_seqs
=
sum
(
seq_group
.
num_seqs
(
status
=
SequenceStatus
.
RUNNING
)
for
seq_group
in
self
.
running
)
if
num_curr_seqs
+
num_new_seqs
>
self
.
scheduler_config
.
max_num_seqs
:
break
...
...
@@ -198,7 +200,9 @@ class Scheduler:
# The total number of sequences in the RUNNING state should not
# exceed the maximum number of sequences.
num_new_seqs
=
seq_group
.
num_seqs
(
status
=
SequenceStatus
.
WAITING
)
num_curr_seqs
=
len
(
self
.
running
)
num_curr_seqs
=
sum
(
seq_group
.
num_seqs
(
status
=
SequenceStatus
.
RUNNING
)
for
seq_group
in
self
.
running
)
if
num_curr_seqs
+
num_new_seqs
>
self
.
scheduler_config
.
max_num_seqs
:
break
...
...
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