pub struct CaptureRequestShape {
pub batch: u64,
pub prompt_tokens: u64,
pub max_predictions: u64,
}Expand description
Request geometry used for admission. This initial protocol is ordinary committed text generation; media, speculative and rank-partitioned runs need separate support.
Fields§
§batch: u64Number of sequences in the request.
prompt_tokens: u64Number of prefill positions per sequence.
max_predictions: u64Maximum number of generated predictions, including the prefill prediction.
Implementations§
Source§impl CaptureRequestShape
impl CaptureRequestShape
Sourcepub fn validate_actual(
self,
point: &ObservationPoint,
phase: CapturePhase,
prediction: u64,
shape: &[u64],
) -> Result<(), CaptureError>
pub fn validate_actual( self, point: &ObservationPoint, phase: CapturePhase, prediction: u64, shape: &[u64], ) -> Result<(), CaptureError>
Checks every known or request-resolved axis, even when another axis is unknown.
Sourcepub fn resolve(
self,
point: &ObservationPoint,
phase: CapturePhase,
prediction: u64,
) -> Result<Option<Vec<u64>>, CaptureError>
pub fn resolve( self, point: &ObservationPoint, phase: CapturePhase, prediction: u64, ) -> Result<Option<Vec<u64>>, CaptureError>
Resolves symbolic axes against the request; an unknown extent returns None.
Trait Implementations§
Source§impl Clone for CaptureRequestShape
impl Clone for CaptureRequestShape
Source§fn clone(&self) -> CaptureRequestShape
fn clone(&self) -> CaptureRequestShape
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for CaptureRequestShape
Source§impl Debug for CaptureRequestShape
impl Debug for CaptureRequestShape
Source§impl<'de> Deserialize<'de> for CaptureRequestShape
impl<'de> Deserialize<'de> for CaptureRequestShape
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>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for CaptureRequestShape
Source§impl PartialEq for CaptureRequestShape
impl PartialEq for CaptureRequestShape
Source§impl Serialize for CaptureRequestShape
impl Serialize for CaptureRequestShape
impl StructuralPartialEq for CaptureRequestShape
Auto Trait Implementations§
impl Freeze for CaptureRequestShape
impl RefUnwindSafe for CaptureRequestShape
impl Send for CaptureRequestShape
impl Sync for CaptureRequestShape
impl Unpin for CaptureRequestShape
impl UnsafeUnpin for CaptureRequestShape
impl UnwindSafe for CaptureRequestShape
Blanket Implementations§
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
Mutably borrows from an owned value. Read more