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
dynamo
Commits
8055b7dd
Unverified
Commit
8055b7dd
authored
Mar 03, 2026
by
Yan Ru Pei
Committed by
GitHub
Mar 03, 2026
Browse files
fix(kv-router): plumb expected_osl through scheduler queue path (#6812)
Signed-off-by:
PeaBrane
<
yanrpei@gmail.com
>
parent
06c7d6f5
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
14 additions
and
1 deletion
+14
-1
lib/bindings/c/src/lib.rs
lib/bindings/c/src/lib.rs
+1
-0
lib/bindings/python/rust/llm/kv.rs
lib/bindings/python/rust/llm/kv.rs
+1
-0
lib/kv-router/src/scheduling/queue.rs
lib/kv-router/src/scheduling/queue.rs
+2
-1
lib/kv-router/src/scheduling/types.rs
lib/kv-router/src/scheduling/types.rs
+3
-0
lib/llm/src/kv_router.rs
lib/llm/src/kv_router.rs
+3
-0
lib/llm/src/kv_router/prefill_router.rs
lib/llm/src/kv_router/prefill_router.rs
+1
-0
lib/llm/src/kv_router/push_router.rs
lib/llm/src/kv_router/push_router.rs
+1
-0
lib/llm/src/kv_router/scheduler.rs
lib/llm/src/kv_router/scheduler.rs
+2
-0
No files found.
lib/bindings/c/src/lib.rs
View file @
8055b7dd
...
...
@@ -493,6 +493,7 @@ impl RouterHandles {
false
,
None
,
0.0
,
None
,
allowed_worker_ids
,
)
.await
...
...
lib/bindings/python/rust/llm/kv.rs
View file @
8055b7dd
...
...
@@ -918,6 +918,7 @@ impl KvRouter {
update_states
,
lora_name
,
0.0
,
None
,
None
,
// allowed_worker_ids: pass via RoutingHints in PreprocessedRequest path
)
.await
...
...
lib/kv-router/src/scheduling/queue.rs
View file @
8055b7dd
...
...
@@ -186,7 +186,7 @@ impl<P: SequencePublisher + 'static, C: WorkerConfigLike> SchedulerQueue<P, C> {
token_sequence
:
request
.token_seq
,
isl
:
request
.isl_tokens
,
overlap
:
selection
.overlap_blocks
,
expected_output_tokens
:
None
,
expected_output_tokens
:
request
.expected_output_tokens
,
worker
:
selection
.worker
,
lora_name
:
request
.lora_name
.clone
(),
})
...
...
@@ -303,6 +303,7 @@ mod tests {
update_states
:
true
,
lora_name
:
None
,
priority_jump
:
0.0
,
expected_output_tokens
:
None
,
allowed_worker_ids
:
None
,
resp_tx
:
Some
(
tx
),
};
...
...
lib/kv-router/src/scheduling/types.rs
View file @
8055b7dd
...
...
@@ -47,6 +47,9 @@ pub struct SchedulingRequest {
pub
lora_name
:
Option
<
String
>
,
/// Priority jump in seconds; decreases effective arrival time in the queue.
pub
priority_jump
:
f64
,
/// Expected output tokens from agent_hints.osl, forwarded to the slot tracker
/// for output block decay estimation.
pub
expected_output_tokens
:
Option
<
u32
>
,
/// Optional set of allowed worker IDs to restrict routing decisions (EPP).
pub
allowed_worker_ids
:
Option
<
HashSet
<
WorkerId
>>
,
pub
resp_tx
:
Option
<
tokio
::
sync
::
oneshot
::
Sender
<
Result
<
SchedulingResponse
,
KvSchedulerError
>>>
,
...
...
lib/llm/src/kv_router.rs
View file @
8055b7dd
...
...
@@ -370,6 +370,7 @@ impl KvRouter {
update_states
:
bool
,
lora_name
:
Option
<
String
>
,
priority_jump
:
f64
,
expected_output_tokens
:
Option
<
u32
>
,
allowed_worker_ids
:
Option
<
HashSet
<
WorkerId
>>
,
)
->
anyhow
::
Result
<
(
WorkerWithDpRank
,
u32
)
>
{
let
start
=
Instant
::
now
();
...
...
@@ -419,6 +420,7 @@ impl KvRouter {
update_states
,
lora_name
,
priority_jump
,
expected_output_tokens
,
allowed_worker_ids
,
)
.instrument
(
tracing
::
info_span!
(
"kv_router.schedule"
))
...
...
@@ -584,6 +586,7 @@ impl AsyncEngine<SingleIn<RouterRequest>, ManyOut<Annotated<RouterResponse>>, Er
None
,
0.0
,
None
,
None
,
)
.await
?
;
...
...
lib/llm/src/kv_router/prefill_router.rs
View file @
8055b7dd
...
...
@@ -539,6 +539,7 @@ impl PrefillRouter {
update_states
,
lora_name
,
priority_jump
,
None
,
allowed_worker_ids
,
)
.await
?
;
...
...
lib/llm/src/kv_router/push_router.rs
View file @
8055b7dd
...
...
@@ -252,6 +252,7 @@ impl KvPushRouter {
!
is_query_only
,
lora_name
,
priority_jump
,
expected_output_tokens
,
allowed_worker_ids
,
)
.await
?
;
...
...
lib/llm/src/kv_router/scheduler.rs
View file @
8055b7dd
...
...
@@ -158,6 +158,7 @@ impl KvScheduler {
update_states
:
bool
,
lora_name
:
Option
<
String
>
,
priority_jump
:
f64
,
expected_output_tokens
:
Option
<
u32
>
,
allowed_worker_ids
:
Option
<
HashSet
<
WorkerId
>>
,
)
->
Result
<
SchedulingResponse
,
KvSchedulerError
>
{
#[cfg(feature
=
"bench"
)]
...
...
@@ -175,6 +176,7 @@ impl KvScheduler {
update_states
,
lora_name
,
priority_jump
,
expected_output_tokens
,
allowed_worker_ids
,
resp_tx
:
Some
(
resp_tx
),
};
...
...
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