pub struct ModelVersionManager { /* private fields */ }Expand description
Model version manager
Implementations§
Source§impl ModelVersionManager
impl ModelVersionManager
Sourcepub fn set_current_version(
&mut self,
version: ModelVersion,
metadata: ModelMetadata,
)
pub fn set_current_version( &mut self, version: ModelVersion, metadata: ModelMetadata, )
Set the current model version
Sourcepub fn get_current_version(&self) -> Option<&ModelVersion>
pub fn get_current_version(&self) -> Option<&ModelVersion>
Get the current model version
Sourcepub fn get_version_history(&self) -> &[ModelMetadata]
pub fn get_version_history(&self) -> &[ModelMetadata]
Get version history
Sourcepub fn can_load_version(
&self,
version: &ModelVersion,
) -> VersioningResult<CompatibilityReport>
pub fn can_load_version( &self, version: &ModelVersion, ) -> VersioningResult<CompatibilityReport>
Check if a version can be loaded
Sourcepub fn apply_migration<T: FloatBounds>(
&self,
from_version: &ModelVersion,
to_version: &ModelVersion,
parameters: &mut HashMap<String, Array2<T>>,
biases: &mut HashMap<String, Array1<T>>,
) -> VersioningResult<()>
pub fn apply_migration<T: FloatBounds>( &self, from_version: &ModelVersion, to_version: &ModelVersion, parameters: &mut HashMap<String, Array2<T>>, biases: &mut HashMap<String, Array1<T>>, ) -> VersioningResult<()>
Apply automatic migration between versions
Sourcepub fn get_migration_path(
&self,
from: &ModelVersion,
to: &ModelVersion,
) -> Vec<ModelVersion>
pub fn get_migration_path( &self, from: &ModelVersion, to: &ModelVersion, ) -> Vec<ModelVersion>
Get migration path between versions
Sourcepub fn validate_metadata(
&self,
metadata: &ModelMetadata,
) -> VersioningResult<()>
pub fn validate_metadata( &self, metadata: &ModelMetadata, ) -> VersioningResult<()>
Validate model metadata
Trait Implementations§
Source§impl Clone for ModelVersionManager
impl Clone for ModelVersionManager
Source§fn clone(&self) -> ModelVersionManager
fn clone(&self) -> ModelVersionManager
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 ModelVersionManager
impl Debug for ModelVersionManager
Auto Trait Implementations§
impl Freeze for ModelVersionManager
impl RefUnwindSafe for ModelVersionManager
impl Send for ModelVersionManager
impl Sync for ModelVersionManager
impl Unpin for ModelVersionManager
impl UnsafeUnpin for ModelVersionManager
impl UnwindSafe for ModelVersionManager
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