chore: bump rust version and annotate/fix all clippy warnings (#1455)
This PR just bumps the latest rust version and makes clippy happy ```bash cargo clippy --all -- -D warnings # Finished dev [unoptimized + debuginfo] target(s) in 0.10s ```
This commit is contained in:
parent
3ccb3bb0b5
commit
becd09978c
|
@ -6,6 +6,7 @@ members = [
|
||||||
"router/grpc-metadata",
|
"router/grpc-metadata",
|
||||||
"launcher"
|
"launcher"
|
||||||
]
|
]
|
||||||
|
resolver = "2"
|
||||||
|
|
||||||
[workspace.package]
|
[workspace.package]
|
||||||
version = "1.3.4"
|
version = "1.3.4"
|
||||||
|
|
|
@ -466,7 +466,7 @@ fn latency_paragraph<'a>(latency: &mut Vec<f64>, name: &'static str) -> Paragrap
|
||||||
let latency_percentiles = crate::utils::percentiles(latency, &[50, 90, 99]);
|
let latency_percentiles = crate::utils::percentiles(latency, &[50, 90, 99]);
|
||||||
|
|
||||||
// Latency p50/p90/p99 texts
|
// Latency p50/p90/p99 texts
|
||||||
let colors = vec![Color::LightGreen, Color::LightYellow, Color::LightRed];
|
let colors = [Color::LightGreen, Color::LightYellow, Color::LightRed];
|
||||||
for (i, (name, value)) in latency_percentiles.iter().enumerate() {
|
for (i, (name, value)) in latency_percentiles.iter().enumerate() {
|
||||||
let span = Line::from(vec![Span::styled(
|
let span = Line::from(vec![Span::styled(
|
||||||
format!("{name}: {value:.2} ms"),
|
format!("{name}: {value:.2} ms"),
|
||||||
|
|
|
@ -53,6 +53,8 @@ impl std::fmt::Display for Quantization {
|
||||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||||
// To keep in track with `server`.
|
// To keep in track with `server`.
|
||||||
match self {
|
match self {
|
||||||
|
#[allow(deprecated)]
|
||||||
|
// Use `eetq` instead, which provides better latencies overall and is drop-in in most cases
|
||||||
Quantization::Bitsandbytes => {
|
Quantization::Bitsandbytes => {
|
||||||
write!(f, "bitsandbytes")
|
write!(f, "bitsandbytes")
|
||||||
}
|
}
|
||||||
|
|
|
@ -224,7 +224,7 @@ pub struct DecodeTimings {
|
||||||
impl DecodeTimings {
|
impl DecodeTimings {
|
||||||
fn new(concat_ns: Option<u64>, forward_ns: u64, decode_ns: u64, total_ns: u64) -> Self {
|
fn new(concat_ns: Option<u64>, forward_ns: u64, decode_ns: u64, total_ns: u64) -> Self {
|
||||||
Self {
|
Self {
|
||||||
concat: concat_ns.map(|v| Duration::from_nanos(v)),
|
concat: concat_ns.map(Duration::from_nanos),
|
||||||
forward: Duration::from_nanos(forward_ns),
|
forward: Duration::from_nanos(forward_ns),
|
||||||
decode: Duration::from_nanos(decode_ns),
|
decode: Duration::from_nanos(decode_ns),
|
||||||
total: Duration::from_nanos(total_ns),
|
total: Duration::from_nanos(total_ns),
|
||||||
|
|
|
@ -127,6 +127,7 @@ impl ShardedClient {
|
||||||
.iter_mut()
|
.iter_mut()
|
||||||
.map(|client| Box::pin(client.prefill(batch.clone())))
|
.map(|client| Box::pin(client.prefill(batch.clone())))
|
||||||
.collect();
|
.collect();
|
||||||
|
#[allow(clippy::type_complexity)]
|
||||||
let results: Result<Vec<(Vec<Generation>, Option<CachedBatch>, PrefillTimings)>> =
|
let results: Result<Vec<(Vec<Generation>, Option<CachedBatch>, PrefillTimings)>> =
|
||||||
join_all(futures).await.into_iter().collect();
|
join_all(futures).await.into_iter().collect();
|
||||||
let mut results = results?;
|
let mut results = results?;
|
||||||
|
@ -159,6 +160,7 @@ impl ShardedClient {
|
||||||
.iter_mut()
|
.iter_mut()
|
||||||
.map(|client| Box::pin(client.decode(batches.clone())))
|
.map(|client| Box::pin(client.decode(batches.clone())))
|
||||||
.collect();
|
.collect();
|
||||||
|
#[allow(clippy::type_complexity)]
|
||||||
let results: Result<Vec<(Vec<Generation>, Option<CachedBatch>, DecodeTimings)>> =
|
let results: Result<Vec<(Vec<Generation>, Option<CachedBatch>, DecodeTimings)>> =
|
||||||
join_all(futures).await.into_iter().collect();
|
join_all(futures).await.into_iter().collect();
|
||||||
let mut results = results?;
|
let mut results = results?;
|
||||||
|
|
|
@ -1,3 +1,6 @@
|
||||||
[toolchain]
|
[toolchain]
|
||||||
channel = "1.70.0"
|
# Released on: 28 December, 2023
|
||||||
|
# Branched from master on: 10 November, 2023
|
||||||
|
# https://releases.rs/docs/1.75.0/
|
||||||
|
channel = "1.75.0"
|
||||||
components = ["rustfmt", "clippy"]
|
components = ["rustfmt", "clippy"]
|
Loading…
Reference in New Issue