pub struct ModelMetadata {
pub version: ModelVersion,
pub created_at: u64,
pub architecture: String,
pub config_hash: Option<String>,
pub performance_metrics: HashMap<String, f64>,
pub parameter_count: usize,
pub framework_version: String,
pub tags: Vec<String>,
pub description: Option<String>,
}Expand description
Model metadata for versioning
Fields§
§version: ModelVersionModel version
created_at: u64Timestamp of creation
architecture: StringModel architecture description
config_hash: Option<String>Training configuration hash
performance_metrics: HashMap<String, f64>Performance metrics at time of saving
parameter_count: usizeModel size in parameters
framework_version: StringFramework version used
Custom tags
description: Option<String>Model description
Implementations§
Source§impl ModelMetadata
impl ModelMetadata
Sourcepub fn new(version: ModelVersion, architecture: String) -> Self
pub fn new(version: ModelVersion, architecture: String) -> Self
Create a new ModelMetadata record for the given version and architecture description
Sourcepub fn with_config_hash(self, hash: String) -> Self
pub fn with_config_hash(self, hash: String) -> Self
Attach a configuration hash string for reproducibility verification
Sourcepub fn with_performance_metrics(self, metrics: HashMap<String, f64>) -> Self
pub fn with_performance_metrics(self, metrics: HashMap<String, f64>) -> Self
Record the final evaluation metrics (e.g., accuracy, F1) for this model version
Sourcepub fn with_parameter_count(self, count: usize) -> Self
pub fn with_parameter_count(self, count: usize) -> Self
Record the total number of trainable parameters in the model
Sourcepub fn with_description(self, description: String) -> Self
pub fn with_description(self, description: String) -> Self
Attach a human-readable description to this model version
Trait Implementations§
Source§impl Clone for ModelMetadata
impl Clone for ModelMetadata
Source§fn clone(&self) -> ModelMetadata
fn clone(&self) -> ModelMetadata
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 moreAuto Trait Implementations§
impl Freeze for ModelMetadata
impl RefUnwindSafe for ModelMetadata
impl Send for ModelMetadata
impl Sync for ModelMetadata
impl Unpin for ModelMetadata
impl UnsafeUnpin for ModelMetadata
impl UnwindSafe for ModelMetadata
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
Converts
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>
Converts
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 more