pub struct WeightSchema {
pub format_id: WeightFormatId,
pub layout_id: WeightLayoutId,
pub version: ContractVersion,
pub components: Vec<WeightComponentSpec>,
pub tensors: Vec<WeightTensorSpec>,
}Fields§
§format_id: WeightFormatId§layout_id: WeightLayoutId§version: ContractVersion§components: Vec<WeightComponentSpec>§tensors: Vec<WeightTensorSpec>Implementations§
Source§impl WeightSchema
impl WeightSchema
pub fn validate(&self, family_id: &ModelFamilyId) -> Result<(), VNextError>
pub fn fingerprint(&self) -> Result<String, VNextError>
pub fn quantization_formats(&self) -> BTreeSet<QuantizationFormatId>
pub fn tensor(&self, weight_id: &WeightId) -> Option<&WeightTensorSpec>
Sourcepub fn physical_component_refs(
&self,
weight_id: &WeightId,
) -> Result<Vec<&WeightComponentSpec>, VNextError>
pub fn physical_component_refs( &self, weight_id: &WeightId, ) -> Result<Vec<&WeightComponentSpec>, VNextError>
Ordered physical components needed to materialize one logical value. The order is the schema’s component order and is therefore stable for fingerprints and resource-plan evidence.
pub fn physical_bytes(&self, weight_id: &WeightId) -> Result<u64, VNextError>
pub fn physical_resource_requirements( &self, weight_id: &WeightId, ) -> Result<Vec<PhysicalWeightComponentRef>, VNextError>
Source§impl WeightSchema
impl WeightSchema
pub fn validate_program_references( &self, family_id: &ModelFamilyId, program: &ModelProgram, ) -> Result<(), VNextError>
Trait Implementations§
Source§impl Clone for WeightSchema
impl Clone for WeightSchema
Source§fn clone(&self) -> WeightSchema
fn clone(&self) -> WeightSchema
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 moreSource§impl Debug for WeightSchema
impl Debug for WeightSchema
Source§impl<'de> Deserialize<'de> for WeightSchema
impl<'de> Deserialize<'de> for WeightSchema
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 WeightSchema
Source§impl PartialEq for WeightSchema
impl PartialEq for WeightSchema
Source§impl Serialize for WeightSchema
impl Serialize for WeightSchema
impl StructuralPartialEq for WeightSchema
Auto Trait Implementations§
impl Freeze for WeightSchema
impl RefUnwindSafe for WeightSchema
impl Send for WeightSchema
impl Sync for WeightSchema
impl Unpin for WeightSchema
impl UnsafeUnpin for WeightSchema
impl UnwindSafe for WeightSchema
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