pub struct ModelVersionControl { /* private fields */ }Expand description
Model version control
Implementations§
Source§impl ModelVersionControl
impl ModelVersionControl
pub fn new() -> Self
pub fn initialize(&mut self) -> Result<(), MLError>
Sourcepub fn create_version(
&mut self,
model_id: &str,
version: ModelVersion,
) -> Result<(), MLError>
pub fn create_version( &mut self, model_id: &str, version: ModelVersion, ) -> Result<(), MLError>
Register a new version for a model. Returns an error if a version with
the same version_id is already registered for that model.
Sourcepub fn get_version(
&self,
model_id: &str,
version_id: &str,
) -> Option<&ModelVersion>
pub fn get_version( &self, model_id: &str, version_id: &str, ) -> Option<&ModelVersion>
Get a specific version of a model by its version id.
Sourcepub fn list_versions(&self, model_id: &str) -> Vec<String>
pub fn list_versions(&self, model_id: &str) -> Vec<String>
List all version ids registered for a model.
Sourcepub fn create_branch(
&mut self,
branch_name: &str,
from_version: &str,
) -> Result<(), MLError>
pub fn create_branch( &mut self, branch_name: &str, from_version: &str, ) -> Result<(), MLError>
Create a branch starting from an existing version. The branch initially contains only the originating version.
Sourcepub fn get_branch(&self, branch_name: &str) -> Option<&Vec<String>>
pub fn get_branch(&self, branch_name: &str) -> Option<&Vec<String>>
Get the list of version ids in a branch.
Sourcepub fn tag_version(
&mut self,
version_id: &str,
tag: &str,
) -> Result<(), MLError>
pub fn tag_version( &mut self, version_id: &str, tag: &str, ) -> Result<(), MLError>
Tag a version. Multiple tags may be attached to the same version.
Get all tags attached to a version.
Sourcepub fn get_by_tag(&self, tag: &str) -> Vec<String>
pub fn get_by_tag(&self, tag: &str) -> Vec<String>
Find all version ids that carry the given tag.
Auto Trait Implementations§
impl Freeze for ModelVersionControl
impl RefUnwindSafe for ModelVersionControl
impl Send for ModelVersionControl
impl Sync for ModelVersionControl
impl Unpin for ModelVersionControl
impl UnsafeUnpin for ModelVersionControl
impl UnwindSafe for ModelVersionControl
Blanket Implementations§
§impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
Aggregate shares in an MPC protocol.
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<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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