Skip to content

Commit 1954fcf

Browse files
authored
chore: Remove service_name from ModelDeploymentCard (#2349)
1 parent ccc8815 commit 1954fcf

File tree

13 files changed

+892
-1001
lines changed

13 files changed

+892
-1001
lines changed

lib/bindings/python/rust/llm/model_card.rs

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,8 @@
11
// SPDX-FileCopyrightText: Copyright (c) 2024-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
22
// SPDX-License-Identifier: Apache-2.0
3-
//
4-
// Licensed under the Apache License, Version 2.0 (the "License");
5-
// you may not use this file except in compliance with the License.
6-
// You may obtain a copy of the License at
7-
//
8-
// http://www.apache.org/licenses/LICENSE-2.0
9-
//
10-
// Unless required by applicable law or agreed to in writing, software
11-
// distributed under the License is distributed on an "AS IS" BASIS,
12-
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13-
// See the License for the specific language governing permissions and
14-
// limitations under the License.
153

164
use super::*;
17-
use llm_rs::model_card::model::ModelDeploymentCard as RsModelDeploymentCard;
5+
use llm_rs::model_card::ModelDeploymentCard as RsModelDeploymentCard;
186

197
#[pyclass]
208
#[derive(Clone)]

lib/llm/src/backend.rs

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,5 @@
11
// SPDX-FileCopyrightText: Copyright (c) 2024-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
22
// SPDX-License-Identifier: Apache-2.0
3-
//
4-
// Licensed under the Apache License, Version 2.0 (the "License");
5-
// you may not use this file except in compliance with the License.
6-
// You may obtain a copy of the License at
7-
//
8-
// http://www.apache.org/licenses/LICENSE-2.0
9-
//
10-
// Unless required by applicable law or agreed to in writing, software
11-
// distributed under the License is distributed on an "AS IS" BASIS,
12-
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13-
// See the License for the specific language governing permissions and
14-
// limitations under the License.
153

164
//! Backend
175
//!
@@ -33,7 +21,7 @@ use anyhow::{Error, Result};
3321
use futures::stream::{self, StreamExt};
3422
use tracing as log;
3523

36-
use crate::model_card::model::{ModelDeploymentCard, TokenizerKind};
24+
use crate::model_card::{ModelDeploymentCard, TokenizerKind};
3725
use dynamo_runtime::{
3826
pipeline::{
3927
async_trait, AsyncEngineContextProvider, ManyOut, Operator, ResponseStream,

lib/llm/src/local_model.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,12 +251,15 @@ impl LocalModel {
251251
&self.full_path
252252
}
253253

254+
/// Human friendly model name. This is the correct name.
254255
pub fn display_name(&self) -> &str {
255256
&self.card.display_name
256257
}
257258

259+
/// The name under which we make this model available over HTTP.
260+
/// A slugified version of the model's name, for use in NATS, etcd, etc.
258261
pub fn service_name(&self) -> &str {
259-
&self.card.service_name
262+
self.card.slug().as_ref()
260263
}
261264

262265
pub fn request_template(&self) -> Option<RequestTemplate> {

lib/llm/src/migration.rs

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,5 @@
11
// SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
22
// SPDX-License-Identifier: Apache-2.0
3-
//
4-
// Licensed under the Apache License, Version 2.0 (the "License");
5-
// you may not use this file except in compliance with the License.
6-
// You may obtain a copy of the License at
7-
//
8-
// http://www.apache.org/licenses/LICENSE-2.0
9-
//
10-
// Unless required by applicable law or agreed to in writing, software
11-
// distributed under the License is distributed on an "AS IS" BASIS,
12-
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13-
// See the License for the specific language governing permissions and
14-
// limitations under the License.
153

164
use std::sync::Arc;
175

@@ -23,7 +11,7 @@ use async_nats::client::{
2311
};
2412

2513
use crate::{
26-
model_card::model::ModelDeploymentCard,
14+
model_card::ModelDeploymentCard,
2715
protocols::common::llm_backend::{LLMEngineOutput, PreprocessedRequest},
2816
};
2917

0 commit comments

Comments
 (0)