pub struct InferenceServerConfig {
pub model_path: PathBuf,
pub model_ref: String,
pub model_oid: String,
pub tenant: String,
pub replica: u16,
pub stage_start: u32,
pub stage_end: Option<u32>,
pub quic_port: Option<u16>,
pub advertise_addr: Option<SocketAddr>,
}Expand description
Configuration for one deployable, CPU-only inference process.
The service is opt-in: an empty model_path is the unconfigured default.
Metal runs two separate processes with distinct replica values and
resource limits, keeping libtorch and KV-cache fault domains isolated.
Fields§
§model_path: PathBufMaterialized model directory loaded before the service becomes ready.
model_ref: StringAuthority-facing model reference used for logs and deployment identity.
model_oid: StringAuthenticated immutable Git object ID for the materialized model.
tenant: StringVerified tenant to which this process is exclusively bound.
replica: u16Replica ordinal. Metal deploys ordinals 0 and 1.
stage_start: u32Inclusive transformer layer start. Partial ranges remain blocked on #314.
stage_end: Option<u32>Exclusive transformer layer end. None means the complete model.
quic_port: Option<u16>Browser-addressable QUIC/WebTransport port.
advertise_addr: Option<SocketAddr>Routable address placed in signed StreamInfo.announcedAt.
Implementations§
Source§impl InferenceServerConfig
impl InferenceServerConfig
Sourcepub fn validate(&self) -> Result<()>
pub fn validate(&self) -> Result<()>
Validate the deployable CPU service contract without loading weights.
Sourcepub fn verify_materialized_oid(&self) -> Result<()>
pub fn verify_materialized_oid(&self) -> Result<()>
Verify that the configured path is inside the checkout at model_oid.
A deployment may not pair an arbitrary directory with a claimed OID: the immutable Git identity is checked before any weights are loaded.
Sourcepub fn instance_name(&self) -> String
pub fn instance_name(&self) -> String
Stable deployment identity for logs and capacity reporting.
Trait Implementations§
Source§impl Clone for InferenceServerConfig
impl Clone for InferenceServerConfig
Source§fn clone(&self) -> InferenceServerConfig
fn clone(&self) -> InferenceServerConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for InferenceServerConfig
impl Debug for InferenceServerConfig
Source§impl Default for InferenceServerConfig
impl Default for InferenceServerConfig
Source§impl<'de> Deserialize<'de> for InferenceServerConfig
impl<'de> Deserialize<'de> for InferenceServerConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for InferenceServerConfig
impl RefUnwindSafe for InferenceServerConfig
impl Send for InferenceServerConfig
impl Sync for InferenceServerConfig
impl Unpin for InferenceServerConfig
impl UnsafeUnpin for InferenceServerConfig
impl UnwindSafe for InferenceServerConfig
Blanket Implementations§
§impl<T> AnySync for T
impl<T> AnySync for T
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request