Skip to content

Commit 7ff3c75

Browse files
committed
Use ModelDeploymentCard.slug() for model name. ModelDeploymentCard.service_name has been removed in PR#2349
1 parent 528626e commit 7ff3c75

File tree

6 files changed

+11
-9
lines changed

6 files changed

+11
-9
lines changed

launch/dynamo-run/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ async fn engine_for(
138138
let endpoint = local_model.endpoint_id().clone();
139139

140140
let engine =
141-
dynamo_llm::mocker::engine::make_mocker_engine(drt, endpoint, Some(local_model.card().service_name.clone()), args).await?;
141+
dynamo_llm::mocker::engine::make_mocker_engine(drt, endpoint, Some(local_model.card().slug().to_string()), args).await?;
142142

143143
Ok(EngineConfig::StaticCore {
144144
engine,

lib/llm/src/entrypoint/input/common.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ pub async fn prepare_engine(
109109
let endpoint_id = local_model.endpoint_id();
110110
let component = distributed_runtime
111111
.namespace(&endpoint_id.namespace)?
112-
.component(&endpoint_id.component)?;
112+
.component(&endpoint_id.component, Some(card.slug().to_string()))?;
113113
let client = component.endpoint(&endpoint_id.name).client().await?;
114114

115115
let kv_chooser = if router_mode == RouterMode::KV {

lib/llm/src/entrypoint/input/endpoint.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ pub async fn run(
3333

3434
let model_name = match &engine_config {
3535
EngineConfig::StaticFull { model, .. } | EngineConfig::StaticCore { model, .. } => {
36-
Some(model.card().service_name.clone())
36+
Some(model.card().slug().to_string())
3737
}
38-
EngineConfig::Dynamic(model) => Some(model.card().service_name.clone()),
38+
EngineConfig::StaticRemote(model) | EngineConfig::Dynamic(model) => Some(model.card().slug().to_string()),
3939
};
4040

4141
let component = distributed_runtime

lib/llm/src/entrypoint/input/http.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ pub async fn run(runtime: Runtime, engine_config: EngineConfig) -> anyhow::Resul
6666
let endpoint_id = local_model.endpoint_id();
6767
let component = distributed_runtime
6868
.namespace(&endpoint_id.namespace)?
69-
.component(&endpoint_id.component)?;
69+
.component(&endpoint_id.component, Some(card.slug().to_string()))?;
7070
let client = component.endpoint(&endpoint_id.name).client().await?;
7171

7272
let kv_chooser = if router_mode == RouterMode::KV {

lib/llm/src/kv_router/prefill_counter.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -366,8 +366,9 @@ mod integration_tests {
366366

367367
// Create namespace and components with same names
368368
let namespace = distributed.namespace("test_prefill_multiworker")?;
369+
// Counters component is not associated with any model, hence model name is None.
369370
let component = namespace
370-
.component("counters")?
371+
.component("counters", None)?
371372
.service_builder()
372373
.create()
373374
.await?;
@@ -430,8 +431,9 @@ mod integration_tests {
430431

431432
// Create namespace and components with same names
432433
let namespace = distributed.namespace("test_prefill_multiworker")?;
434+
// Counters component is not associated with any model, hence model name is None.
433435
let component = namespace
434-
.component("counters")?
436+
.component("counters", None)?
435437
.service_builder()
436438
.create()
437439
.await?;

lib/llm/src/kv_router/sequence.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -800,7 +800,7 @@ mod tests {
800800
// Create namespace and component with same names as thread 2
801801
let namespace = distributed.namespace("test_multiworker_sequences")?;
802802
let component = namespace
803-
.component("sequences")?
803+
.component("sequences", None)?
804804
.service_builder()
805805
.create()
806806
.await?;
@@ -914,7 +914,7 @@ mod tests {
914914
// Create namespace and component with same names as thread 1
915915
let namespace = distributed.namespace("test_multiworker_sequences")?;
916916
let component = namespace
917-
.component("sequences")?
917+
.component("sequences", None)?
918918
.service_builder()
919919
.create()
920920
.await?;

0 commit comments

Comments
 (0)