From a2a97b05d6c59bb95e54124a68c69b17851d3480 Mon Sep 17 00:00:00 2001 From: Nicolas Patry Date: Tue, 25 Jun 2024 17:53:36 +0200 Subject: [PATCH] Fix CI . (#2118) Fix clippy. --- README.md | 2 +- benchmark/src/main.rs | 4 +++- launcher/src/main.rs | 3 +-- router/src/main.rs | 4 +++- 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 2016b9154c9..d60c7cdeaa8 100644 --- a/README.md +++ b/README.md @@ -153,7 +153,7 @@ this will impact performance. ### Distributed Tracing `text-generation-inference` is instrumented with distributed tracing using OpenTelemetry. You can use this feature -by setting the address to an OTLP collector with the `--otlp-endpoint` argument. The default service name can be +by setting the address to an OTLP collector with the `--otlp-endpoint` argument. The default service name can be overridden with the `--otlp-service-name` argument ### Architecture diff --git a/benchmark/src/main.rs b/benchmark/src/main.rs index 603b4087c52..2ee3d7c551a 100644 --- a/benchmark/src/main.rs +++ b/benchmark/src/main.rs @@ -147,7 +147,9 @@ fn main() -> Result<(), Box> { tracing::info!("Downloading tokenizer"); // Parse Huggingface hub token - let auth_token = std::env::var("HF_TOKEN").or_else(|_| std::env::var("HUGGING_FACE_HUB_TOKEN")).ok(); + let auth_token = std::env::var("HF_TOKEN") + .or_else(|_| std::env::var("HUGGING_FACE_HUB_TOKEN")) + .ok(); // Download and instantiate tokenizer // We need to download it outside of the Tokio runtime diff --git a/launcher/src/main.rs b/launcher/src/main.rs index 2e06c1ef19a..c7529604d11 100644 --- a/launcher/src/main.rs +++ b/launcher/src/main.rs @@ -762,7 +762,7 @@ fn num_cuda_devices() -> Option { Err(_) => match env::var("NVIDIA_VISIBLE_DEVICES") { Ok(devices) => devices, Err(_) => env::var("ZE_AFFINITY_MASK").ok()?, - } + }, }; let n_devices = devices.split(',').count(); Some(n_devices) @@ -1225,7 +1225,6 @@ fn spawn_webserver( router_args.push("--otlp-service-name".to_string()); router_args.push(otlp_service_name); - // CORS origins for origin in args.cors_allow_origin.into_iter() { router_args.push("--cors-allow-origin".to_string()); diff --git a/router/src/main.rs b/router/src/main.rs index dcb9ce99343..a7caec2e755 100644 --- a/router/src/main.rs +++ b/router/src/main.rs @@ -159,7 +159,9 @@ async fn main() -> Result<(), RouterError> { }); // Parse Huggingface hub token - let authorization_token = std::env::var("HF_TOKEN").or_else(|_| std::env::var("HUGGING_FACE_HUB_TOKEN")).ok(); + let authorization_token = std::env::var("HF_TOKEN") + .or_else(|_| std::env::var("HUGGING_FACE_HUB_TOKEN")) + .ok(); // Tokenizer instance // This will only be used to validate payloads