pub struct SaveOptions {
pub compression: Compression,
pub metadata: Metadata,
pub quality_score: Option<u8>,
}Expand description
Options for saving models.
Fields§
§compression: CompressionCompression algorithm
metadata: MetadataAdditional metadata
quality_score: Option<u8>Quality score from Poka-yoke validation (APR-POKA-001).
None: no validation performed (score=0 in file)Some(0): explicit failure — save will be REFUSED (Jidoka)Some(1-59): validation failed but allowed to saveSome(60-100): validation passed
Implementations§
Source§impl SaveOptions
impl SaveOptions
Sourcepub fn with_compression(self, compression: Compression) -> Self
pub fn with_compression(self, compression: Compression) -> Self
Set compression algorithm.
Sourcepub fn with_description(self, desc: impl Into<String>) -> Self
pub fn with_description(self, desc: impl Into<String>) -> Self
Set description.
Sourcepub fn with_distillation_info(self, info: DistillationInfo) -> Self
pub fn with_distillation_info(self, info: DistillationInfo) -> Self
Set distillation info (spec §6.3).
Sourcepub fn with_license(self, license: LicenseInfo) -> Self
pub fn with_license(self, license: LicenseInfo) -> Self
Set license info (spec §9.1).
Sourcepub fn with_model_card(self, card: ModelCard) -> Self
pub fn with_model_card(self, card: ModelCard) -> Self
Set model card (spec §11).
Sourcepub fn with_quality_score(self, score: u8) -> Self
pub fn with_quality_score(self, score: u8) -> Self
Set quality score from Poka-yoke validation (APR-POKA-001).
§Jidoka (Stop the Line)
- Score 0 will cause
save()to REFUSE the write - Score 1-59 allows save with warning
- Score 60-100 is passing
Trait Implementations§
Source§impl Clone for SaveOptions
impl Clone for SaveOptions
Source§fn clone(&self) -> SaveOptions
fn clone(&self) -> SaveOptions
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 SaveOptions
impl Debug for SaveOptions
Source§impl Default for SaveOptions
impl Default for SaveOptions
Source§fn default() -> SaveOptions
fn default() -> SaveOptions
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for SaveOptions
impl RefUnwindSafe for SaveOptions
impl Send for SaveOptions
impl Sync for SaveOptions
impl Unpin for SaveOptions
impl UnsafeUnpin for SaveOptions
impl UnwindSafe for SaveOptions
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