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 {
|
async fn health(&self, _: bool) -> bool {
|
||||||
true
|
true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn name(&self) -> &'static str {
|
||||||
|
"TensorRT-LLM"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -108,6 +108,10 @@ impl Backend for BackendV2 {
|
|||||||
fn start_health(&self) -> bool {
|
fn start_health(&self) -> bool {
|
||||||
true
|
true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn name(&self) -> &'static str {
|
||||||
|
"tgi-v2"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Batching logic
|
/// Batching logic
|
||||||
|
@ -115,6 +115,10 @@ impl Backend for BackendV3 {
|
|||||||
fn start_health(&self) -> bool {
|
fn start_health(&self) -> bool {
|
||||||
true
|
true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn name(&self) -> &'static str {
|
||||||
|
"tgi-v3"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Batching logic
|
/// Batching logic
|
||||||
|
@ -40,6 +40,8 @@ pub trait Backend {
|
|||||||
fn start_health(&self) -> bool {
|
fn start_health(&self) -> bool {
|
||||||
false
|
false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn name(&self) -> &'static str;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Inference struct
|
/// Inference struct
|
||||||
|
@ -1898,6 +1898,7 @@ pub async fn run(
|
|||||||
disable_grammar_support,
|
disable_grammar_support,
|
||||||
max_client_batch_size,
|
max_client_batch_size,
|
||||||
usage_stats_level,
|
usage_stats_level,
|
||||||
|
backend.name(),
|
||||||
);
|
);
|
||||||
Some(usage_stats::UserAgent::new(reduced_args))
|
Some(usage_stats::UserAgent::new(reduced_args))
|
||||||
}
|
}
|
||||||
|
@ -97,6 +97,7 @@ pub struct Args {
|
|||||||
disable_grammar_support: bool,
|
disable_grammar_support: bool,
|
||||||
max_client_batch_size: usize,
|
max_client_batch_size: usize,
|
||||||
usage_stats_level: UsageStatsLevel,
|
usage_stats_level: UsageStatsLevel,
|
||||||
|
backend_name: &'static str,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Args {
|
impl Args {
|
||||||
@ -120,6 +121,7 @@ impl Args {
|
|||||||
disable_grammar_support: bool,
|
disable_grammar_support: bool,
|
||||||
max_client_batch_size: usize,
|
max_client_batch_size: usize,
|
||||||
usage_stats_level: UsageStatsLevel,
|
usage_stats_level: UsageStatsLevel,
|
||||||
|
backend_name: &'static str,
|
||||||
) -> Self {
|
) -> Self {
|
||||||
Self {
|
Self {
|
||||||
model_config,
|
model_config,
|
||||||
@ -140,6 +142,7 @@ impl Args {
|
|||||||
disable_grammar_support,
|
disable_grammar_support,
|
||||||
max_client_batch_size,
|
max_client_batch_size,
|
||||||
usage_stats_level,
|
usage_stats_level,
|
||||||
|
backend_name,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user