mirror of
https://github.com/huggingface/text-generation-inference.git
synced 2025-04-19 13:52:07 +00:00
Add backend name to telemetry (#2962)
* feat: Add backend name to telemetry
This commit is contained in:
parent
eb3df0f46f
commit
73b7cf83f6
@ -340,4 +340,8 @@ impl Backend for TensorRtLlmBackendV2 {
|
||||
async fn health(&self, _: bool) -> bool {
|
||||
true
|
||||
}
|
||||
|
||||
fn name(&self) -> &'static str {
|
||||
"TensorRT-LLM"
|
||||
}
|
||||
}
|
||||
|
@ -108,6 +108,10 @@ impl Backend for BackendV2 {
|
||||
fn start_health(&self) -> bool {
|
||||
true
|
||||
}
|
||||
|
||||
fn name(&self) -> &'static str {
|
||||
"tgi-v2"
|
||||
}
|
||||
}
|
||||
|
||||
/// Batching logic
|
||||
|
@ -115,6 +115,10 @@ impl Backend for BackendV3 {
|
||||
fn start_health(&self) -> bool {
|
||||
true
|
||||
}
|
||||
|
||||
fn name(&self) -> &'static str {
|
||||
"tgi-v3"
|
||||
}
|
||||
}
|
||||
|
||||
/// Batching logic
|
||||
|
@ -40,6 +40,8 @@ pub trait Backend {
|
||||
fn start_health(&self) -> bool {
|
||||
false
|
||||
}
|
||||
|
||||
fn name(&self) -> &'static str;
|
||||
}
|
||||
|
||||
/// Inference struct
|
||||
|
@ -1898,6 +1898,7 @@ pub async fn run(
|
||||
disable_grammar_support,
|
||||
max_client_batch_size,
|
||||
usage_stats_level,
|
||||
backend.name(),
|
||||
);
|
||||
Some(usage_stats::UserAgent::new(reduced_args))
|
||||
}
|
||||
|
@ -97,6 +97,7 @@ pub struct Args {
|
||||
disable_grammar_support: bool,
|
||||
max_client_batch_size: usize,
|
||||
usage_stats_level: UsageStatsLevel,
|
||||
backend_name: &'static str,
|
||||
}
|
||||
|
||||
impl Args {
|
||||
@ -120,6 +121,7 @@ impl Args {
|
||||
disable_grammar_support: bool,
|
||||
max_client_batch_size: usize,
|
||||
usage_stats_level: UsageStatsLevel,
|
||||
backend_name: &'static str,
|
||||
) -> Self {
|
||||
Self {
|
||||
model_config,
|
||||
@ -140,6 +142,7 @@ impl Args {
|
||||
disable_grammar_support,
|
||||
max_client_batch_size,
|
||||
usage_stats_level,
|
||||
backend_name,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user