"docs/vscode:/vscode.git/clone" did not exist on "781fa062fb5377993b4b7cc65a07e4cea4d38283"
Unverified Commit 57bdbdf1 authored by Ryan Olson's avatar Ryan Olson Committed by GitHub
Browse files

feat: upgrade rust to v1.93.0 (#6802)


Signed-off-by: default avatarRyan Olson <rolson@nvidia.com>
parent 56212b49
......@@ -2735,20 +2735,20 @@ dependencies = [
"cfg-if 1.0.4",
"js-sys",
"libc",
"r-efi",
"r-efi 5.3.0",
"wasip2",
"wasm-bindgen",
]
[[package]]
name = "getrandom"
version = "0.4.1"
version = "0.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "139ef39800118c7683f2fd3c98c1b23c09ae076556b435f8e9064ae108aaeeec"
checksum = "0de51e6874e94e7bf76d726fc5d13ba782deca734ff60d5bb2fb2607c7406555"
dependencies = [
"cfg-if 1.0.4",
"libc",
"r-efi",
"r-efi 6.0.0",
"wasip2",
"wasip3",
]
......@@ -3479,9 +3479,9 @@ dependencies = [
[[package]]
name = "ipnet"
version = "2.11.0"
version = "2.12.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "469fb0b9cefa57e3ef31275ee7cacb78f2fdca44e4765491884a2b119d4eb130"
checksum = "d98f6fed1fde3f8c21bc40a1abb88dd75e67924f9cffc3ef95607bad8017f8e2"
[[package]]
name = "iri-string"
......@@ -5980,6 +5980,12 @@ version = "5.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f"
[[package]]
name = "r-efi"
version = "6.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf"
[[package]]
name = "rand"
version = "0.8.5"
......@@ -7473,7 +7479,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "82a72c767771b47409d2345987fda8628641887d5466101319899796367354a0"
dependencies = [
"fastrand",
"getrandom 0.4.1",
"getrandom 0.4.2",
"once_cell",
"rustix 1.1.4",
"windows-sys 0.61.2",
......@@ -8546,7 +8552,7 @@ version = "1.21.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b672338555252d43fd2240c714dc444b8c6fb0a5c5335e65a07bba7742735ddb"
dependencies = [
"getrandom 0.4.1",
"getrandom 0.4.2",
"js-sys",
"serde_core",
"wasm-bindgen",
......
......@@ -994,7 +994,7 @@ pub unsafe extern "C" fn free_routing_result(result: *mut CRoutingResult) {
// Free token IDs
if !res.token_ids.is_null() && res.token_count > 0 {
drop(unsafe {
Box::from_raw(std::slice::from_raw_parts_mut(
Box::from_raw(std::ptr::slice_from_raw_parts_mut(
res.token_ids,
res.token_count,
))
......
......@@ -2287,20 +2287,20 @@ dependencies = [
"cfg-if 1.0.4",
"js-sys",
"libc",
"r-efi",
"r-efi 5.3.0",
"wasip2",
"wasm-bindgen",
]
[[package]]
name = "getrandom"
version = "0.4.1"
version = "0.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "139ef39800118c7683f2fd3c98c1b23c09ae076556b435f8e9064ae108aaeeec"
checksum = "0de51e6874e94e7bf76d726fc5d13ba782deca734ff60d5bb2fb2607c7406555"
dependencies = [
"cfg-if 1.0.4",
"libc",
"r-efi",
"r-efi 6.0.0",
"wasip2",
"wasip3",
]
......@@ -2898,9 +2898,9 @@ dependencies = [
[[package]]
name = "ipnet"
version = "2.11.0"
version = "2.12.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "469fb0b9cefa57e3ef31275ee7cacb78f2fdca44e4765491884a2b119d4eb130"
checksum = "d98f6fed1fde3f8c21bc40a1abb88dd75e67924f9cffc3ef95607bad8017f8e2"
[[package]]
name = "iri-string"
......@@ -5199,6 +5199,12 @@ version = "5.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f"
[[package]]
name = "r-efi"
version = "6.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf"
[[package]]
name = "rand"
version = "0.8.5"
......@@ -6375,7 +6381,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "82a72c767771b47409d2345987fda8628641887d5466101319899796367354a0"
dependencies = [
"fastrand",
"getrandom 0.4.1",
"getrandom 0.4.2",
"once_cell",
"rustix 1.1.4",
"windows-sys 0.61.2",
......@@ -7311,7 +7317,7 @@ version = "1.21.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b672338555252d43fd2240c714dc444b8c6fb0a5c5335e65a07bba7742735ddb"
dependencies = [
"getrandom 0.4.1",
"getrandom 0.4.2",
"js-sys",
"serde_core",
"wasm-bindgen",
......
......@@ -2347,20 +2347,20 @@ dependencies = [
"cfg-if 1.0.4",
"js-sys",
"libc",
"r-efi",
"r-efi 5.3.0",
"wasip2",
"wasm-bindgen",
]
[[package]]
name = "getrandom"
version = "0.4.1"
version = "0.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "139ef39800118c7683f2fd3c98c1b23c09ae076556b435f8e9064ae108aaeeec"
checksum = "0de51e6874e94e7bf76d726fc5d13ba782deca734ff60d5bb2fb2607c7406555"
dependencies = [
"cfg-if 1.0.4",
"libc",
"r-efi",
"r-efi 6.0.0",
"wasip2",
"wasip3",
]
......@@ -2958,9 +2958,9 @@ dependencies = [
[[package]]
name = "ipnet"
version = "2.11.0"
version = "2.12.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "469fb0b9cefa57e3ef31275ee7cacb78f2fdca44e4765491884a2b119d4eb130"
checksum = "d98f6fed1fde3f8c21bc40a1abb88dd75e67924f9cffc3ef95607bad8017f8e2"
[[package]]
name = "iri-string"
......@@ -5257,6 +5257,12 @@ version = "5.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f"
[[package]]
name = "r-efi"
version = "6.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf"
[[package]]
name = "rand"
version = "0.8.5"
......@@ -6433,7 +6439,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "82a72c767771b47409d2345987fda8628641887d5466101319899796367354a0"
dependencies = [
"fastrand",
"getrandom 0.4.1",
"getrandom 0.4.2",
"once_cell",
"rustix 1.1.4",
"windows-sys 0.61.2",
......@@ -7369,7 +7375,7 @@ version = "1.21.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b672338555252d43fd2240c714dc444b8c6fb0a5c5335e65a07bba7742735ddb"
dependencies = [
"getrandom 0.4.1",
"getrandom 0.4.2",
"js-sys",
"serde_core",
"wasm-bindgen",
......
......@@ -25,11 +25,12 @@ use super::BlockManager;
/// Capacity settings for the TinyLFU frequency tracker used by
/// [`BlockRegistry`] and the multi-level LRU backend.
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Default)]
pub enum FrequencyTrackingCapacity {
/// Small capacity: 2^18 (262,144) entries
Small,
/// Medium capacity: 2^21 (2,097,152) entries - default
#[default]
Medium,
/// Large capacity: 2^24 (16,777,216) entries
Large,
......@@ -51,12 +52,6 @@ impl FrequencyTrackingCapacity {
}
}
impl Default for FrequencyTrackingCapacity {
fn default() -> Self {
Self::Medium
}
}
/// Configuration for the inactive pool backend.
pub enum InactiveBackendConfig {
/// HashMap with configurable reuse policy
......
......@@ -36,7 +36,7 @@ pub enum BlockDim {
///
/// - `UniversalTP`: `[nh, nl, no, nt, hd]` - heads outermost for TP resharding
/// - `OperationalNHD`: `[nl, no, nt, nh, hd]` - inner is `[nt, nh, hd]`
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize, Default)]
pub enum KvBlockLayout {
/// Universal format: `[nh, nl, no, nt, hd]`
///
......@@ -71,16 +71,10 @@ pub enum KvBlockLayout {
///
/// Operations involving Unknown layouts may fail or require explicit
/// configuration.
#[default]
Unknown,
}
impl Default for KvBlockLayout {
fn default() -> Self {
// Unknown until runtime detection determines the actual format
Self::Unknown
}
}
impl KvBlockLayout {
/// Get the dimension ordering as an array.
///
......
......@@ -17,18 +17,13 @@ use serde::{Deserialize, Serialize};
/// This enum describes how the blocks are organized and formatted in memory.
/// Currently only `Operational` is supported, but future variants may include
/// different compression schemes or memory layouts.
#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize, Default)]
pub enum BlockFormat {
/// Standard operational format - blocks are stored in their normal, uncompressed form.
#[default]
Operational,
}
impl Default for BlockFormat {
fn default() -> Self {
Self::Operational
}
}
/// Details specific to fully contiguous layouts.
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct FullyContiguousDetails {
......
......@@ -17,18 +17,13 @@ use serde::{Deserialize, Serialize};
/// This enum describes how the blocks are organized and formatted in memory.
/// Currently only `Operational` is supported, but future variants may include
/// different compression schemes or memory layouts.
#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize, Default)]
pub enum BlockFormat {
/// Standard operational format - blocks are stored in their normal, uncompressed form.
#[default]
Operational,
}
impl Default for BlockFormat {
fn default() -> Self {
Self::Operational
}
}
/// Details specific to fully contiguous layouts.
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct FullyContiguousDetails {
......
......@@ -252,12 +252,8 @@ async fn evaluate(
}
}
entry.finish_reason = chat_comp.finish_reason;
if chat_comp.finish_reason.is_some() {
tracing::trace!(
request_id,
"finish reason: {:?}",
chat_comp.finish_reason.unwrap()
);
if let Some(finish_reason) = chat_comp.finish_reason.as_ref() {
tracing::trace!(request_id, "finish reason: {:?}", finish_reason);
break;
}
}
......
......@@ -459,8 +459,8 @@ impl GrpcInferenceService for KserveService {
let mut reply = ModelStreamInferResponse::try_from(data).map_err(|e| {
Status::invalid_argument(format!("Failed to parse response: {}", e))
})?;
if reply.infer_response.is_some() {
reply.infer_response.as_mut().unwrap().id = request_id.clone();
if let Some(infer_response) = reply.infer_response.as_mut() {
infer_response.id = request_id.clone();
}
yield reply;
},
......@@ -514,8 +514,8 @@ impl GrpcInferenceService for KserveService {
let mut reply = ModelStreamInferResponse::try_from(data).map_err(|e| {
Status::invalid_argument(format!("Failed to parse response: {}", e))
})?;
if reply.infer_response.is_some() {
reply.infer_response.as_mut().unwrap().id = request_id.clone();
if let Some(infer_response) = reply.infer_response.as_mut() {
infer_response.id = request_id.clone();
}
yield reply;
},
......@@ -538,8 +538,8 @@ impl GrpcInferenceService for KserveService {
let mut response: ModelStreamInferResponse = completion_response.try_into().map_err(|e| {
Status::invalid_argument(format!("Failed to parse response: {}", e))
})?;
if response.infer_response.is_some() {
response.infer_response.as_mut().unwrap().id = request_id.clone();
if let Some(infer_response) = response.infer_response.as_mut() {
infer_response.id = request_id.clone();
}
yield response;
}
......
......@@ -657,7 +657,7 @@ impl OpenAIPreprocessor {
request_id = inner.context.id(),
"Cancellation issued last message; closing stream"
);
inner.finished = true; // Mark as finished
// inner.finished = true; // Mark as finished
return None;
}
......
......@@ -133,9 +133,9 @@ impl DeltaAggregator {
}
};
if aggregator.error.is_none() && delta.data.is_some() {
// Extract the data payload from the delta.
let delta = delta.data.unwrap();
if aggregator.error.is_none()
&& let Some(delta) = delta.data
{
aggregator.id = delta.id;
aggregator.model = delta.model;
aggregator.created = delta.created;
......
......@@ -70,11 +70,12 @@ impl DeltaAggregator {
}
};
if aggregator.error.is_none() && delta.data.is_some() {
if aggregator.error.is_none()
&& let Some(delta) = delta.data
{
// TODO(#14) - Aggregate Annotation
// these are cheap to move so we do it every time since we are consuming the delta
let delta = delta.data.unwrap();
aggregator.id = delta.inner.id;
aggregator.model = delta.inner.model;
aggregator.created = delta.inner.created;
......
......@@ -73,7 +73,7 @@ fn test_model_discovery_scoping_scenarios() {
// Scenario 1: Frontend configured for specific namespace should only see models from that namespace
let frontend_namespace = "vllm-agg";
let available_models = vec![
let available_models = [
create_test_endpoint("vllm-agg", "backend", "generate"),
create_test_endpoint("vllm-agg", "backend", "generate"),
create_test_endpoint("sglang-prod", "backend", "generate"),
......@@ -120,7 +120,7 @@ fn test_model_discovery_scoping_scenarios() {
fn test_namespace_boundary_conditions() {
// Test edge cases and boundary conditions for namespace handling
let test_models = vec![
let test_models = [
create_test_endpoint("", "backend", "generate"), // Empty namespace
create_test_endpoint("dynamo", "backend", "generate"), // Global namespace
create_test_endpoint("ns-with-special-chars_123", "backend", "generate"),
......
......@@ -15,21 +15,16 @@ pub use deepseek_v3_parser::{detect_tool_call_start_deepseek_v3, parse_tool_call
pub use super::config::JsonParserConfig;
pub use super::response::ToolCallResponse;
#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
pub enum JsonParserType {
// Basic is generic json parser which can handle most of the cases
#[default]
Basic,
// Model Specific JSON Parsers
DeepseekV3,
DeepseekV31,
}
impl Default for JsonParserType {
fn default() -> Self {
Self::Basic
}
}
pub fn try_tool_call_parse_json(
message: &str,
config: &JsonParserConfig,
......
......@@ -1212,20 +1212,20 @@ dependencies = [
"cfg-if 1.0.4",
"js-sys",
"libc",
"r-efi",
"r-efi 5.3.0",
"wasip2",
"wasm-bindgen",
]
[[package]]
name = "getrandom"
version = "0.4.1"
version = "0.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "139ef39800118c7683f2fd3c98c1b23c09ae076556b435f8e9064ae108aaeeec"
checksum = "0de51e6874e94e7bf76d726fc5d13ba782deca734ff60d5bb2fb2607c7406555"
dependencies = [
"cfg-if 1.0.4",
"libc",
"r-efi",
"r-efi 6.0.0",
"wasip2",
"wasip3",
]
......@@ -1646,9 +1646,9 @@ dependencies = [
[[package]]
name = "ipnet"
version = "2.11.0"
version = "2.12.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "469fb0b9cefa57e3ef31275ee7cacb78f2fdca44e4765491884a2b119d4eb130"
checksum = "d98f6fed1fde3f8c21bc40a1abb88dd75e67924f9cffc3ef95607bad8017f8e2"
[[package]]
name = "iri-string"
......@@ -2726,6 +2726,12 @@ version = "5.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f"
[[package]]
name = "r-efi"
version = "6.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf"
[[package]]
name = "rand"
version = "0.8.5"
......@@ -3495,7 +3501,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "82a72c767771b47409d2345987fda8628641887d5466101319899796367354a0"
dependencies = [
"fastrand",
"getrandom 0.4.1",
"getrandom 0.4.2",
"once_cell",
"rustix",
"windows-sys 0.61.2",
......@@ -4049,7 +4055,7 @@ version = "1.21.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b672338555252d43fd2240c714dc444b8c6fb0a5c5335e65a07bba7742735ddb"
dependencies = [
"getrandom 0.4.1",
"getrandom 0.4.2",
"js-sys",
"serde_core",
"wasm-bindgen",
......
[toolchain]
channel = "1.90.0"
channel = "1.93.1"
......@@ -619,22 +619,17 @@ impl DistributedConfig {
/// - `Nats`: Use NATS for request distribution (legacy)
/// - `Http`: Use HTTP/2 for request distribution
/// - `Tcp`: Use raw TCP for request distribution with msgpack support (default)
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Default)]
pub enum RequestPlaneMode {
/// Use NATS for request plane
Nats,
/// Use HTTP/2 for request plane
Http,
/// Use raw TCP for request plane with msgpack support
#[default]
Tcp,
}
impl Default for RequestPlaneMode {
fn default() -> Self {
Self::Tcp
}
}
impl fmt::Display for RequestPlaneMode {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
match self {
......
......@@ -163,8 +163,12 @@ impl StreamSender {
#[allow(clippy::needless_update)]
pub async fn send_prologue(&mut self, error: Option<String>) -> Result<(), String> {
if let Some(prologue) = self.prologue.take() {
let prologue = ResponseStreamPrologue { error, ..prologue };
// leaving the original logic in place for now
// error overrides the dissolved prologue, but the only field on `ResponseStreamPrologue` is `error`
// so the second argument can never be used, and the value of error passed by the caller would always be used
if let Some(_prologue) = self.prologue.take() {
// let prologue = ResponseStreamPrologue { error, ..prologue };
let prologue = ResponseStreamPrologue { error };
let header_bytes: Bytes = match serde_json::to_vec(&prologue) {
Ok(b) => b.into(),
Err(err) => {
......
[toolchain]
channel = "1.90.0"
channel = "1.93.1"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment