[model-gateway] bug fix on module name (#16332)

This commit is contained in:
Chang Su
2026-01-02 21:56:18 -08:00
committed by GitHub
parent bdde949619
commit d8ac5eecf7
66 changed files with 189 additions and 222 deletions
@@ -1,7 +1,7 @@
use std::{sync::Arc, thread};
use criterion::{black_box, criterion_group, criterion_main, BenchmarkId, Criterion, Throughput};
use sgl_model_gateway::{
use smg::{
core::{BasicWorkerBuilder, Worker, WorkerType},
policies::{LoadBalancingPolicy, ManualPolicy, SelectWorkerInfo},
};
@@ -2,7 +2,7 @@ use std::time::Instant;
use criterion::{black_box, criterion_group, criterion_main, BenchmarkId, Criterion, Throughput};
use serde_json::{from_str, to_string, to_value, to_vec};
use sgl_model_gateway::{
use smg::{
core::{BasicWorker, BasicWorkerBuilder, Worker, WorkerType},
protocols::{
chat::{ChatCompletionRequest, ChatMessage, MessageContent},
@@ -1,9 +1,7 @@
use std::{collections::HashMap, sync::Arc};
use criterion::{black_box, criterion_group, criterion_main, BenchmarkId, Criterion};
use sgl_model_gateway::core::{
BasicWorkerBuilder, CircuitBreakerConfig, WorkerRegistry, WorkerType,
};
use smg::core::{BasicWorkerBuilder, CircuitBreakerConfig, WorkerRegistry, WorkerType};
// Helper to populate registry
fn setup_registry(count: usize) -> Arc<WorkerRegistry> {
@@ -13,7 +13,7 @@ use std::{
};
use criterion::{black_box, criterion_group, BenchmarkId, Criterion, Throughput};
use sgl_model_gateway::tokenizer::{
use smg::tokenizer::{
cache::{CacheConfig, CachedTokenizer},
huggingface::HuggingFaceTokenizer,
sequence::Sequence,
@@ -31,11 +31,9 @@ fn get_tokenizer_path() -> &'static PathBuf {
// with special: true, normalized: false - perfect for demonstrating L1 cache
let rt = tokio::runtime::Runtime::new().expect("Failed to create tokio runtime");
let tokenizer_dir = rt.block_on(async {
sgl_model_gateway::tokenizer::hub::download_tokenizer_from_hf(
"Qwen/Qwen3-4B-Instruct-2507",
)
.await
.expect("Failed to download Qwen3-4B-Instruct tokenizer from HuggingFace")
smg::tokenizer::hub::download_tokenizer_from_hf("Qwen/Qwen3-4B-Instruct-2507")
.await
.expect("Failed to download Qwen3-4B-Instruct tokenizer from HuggingFace")
});
// The download_tokenizer_from_hf returns the directory containing tokenizer.json
@@ -19,7 +19,7 @@ use std::{
use criterion::{black_box, criterion_group, BenchmarkId, Criterion, Throughput};
use serde_json::json;
use sgl_model_gateway::{
use smg::{
protocols::common::{Function, Tool},
tool_parser::{JsonParser, ParserFactory as ToolParserFactory, ToolParser},
};
+1 -1
View File
@@ -25,7 +25,7 @@ use rand::{
rng as thread_rng, Rng,
};
// Import the tree module
use sgl_model_gateway::policies::tree::Tree;
use smg::policies::tree::Tree;
// Global results storage for summary
lazy_static::lazy_static! {