pub struct ModelVersionManager { /* private fields */ }Expand description
Main model versioning manager
Implementations§
Source§impl ModelVersionManager
impl ModelVersionManager
Sourcepub fn new(storage: Arc<dyn ModelStorage>) -> Self
pub fn new(storage: Arc<dyn ModelStorage>) -> Self
Create a new model version manager
Sourcepub async fn register_version(
&self,
model_name: &str,
version: &str,
metadata: ModelMetadata,
artifacts: Vec<Artifact>,
) -> Result<Uuid>
pub async fn register_version( &self, model_name: &str, version: &str, metadata: ModelMetadata, artifacts: Vec<Artifact>, ) -> Result<Uuid>
Register a new model version
Sourcepub async fn get_version(
&self,
version_id: Uuid,
) -> Result<Option<VersionedModel>>
pub async fn get_version( &self, version_id: Uuid, ) -> Result<Option<VersionedModel>>
Get a specific model version
Sourcepub async fn get_version_by_name(
&self,
model_name: &str,
version: &str,
) -> Result<Option<VersionedModel>>
pub async fn get_version_by_name( &self, model_name: &str, version: &str, ) -> Result<Option<VersionedModel>>
Get model version by name and version
Sourcepub async fn list_versions(
&self,
model_name: &str,
) -> Result<Vec<VersionedModel>>
pub async fn list_versions( &self, model_name: &str, ) -> Result<Vec<VersionedModel>>
List all versions for a model
Sourcepub async fn query_versions(
&self,
query: VersionQuery,
) -> Result<Vec<VersionedModel>>
pub async fn query_versions( &self, query: VersionQuery, ) -> Result<Vec<VersionedModel>>
Query versions with filters
Sourcepub async fn promote_to_production(&self, version_id: Uuid) -> Result<()>
pub async fn promote_to_production(&self, version_id: Uuid) -> Result<()>
Promote a version to production
Sourcepub async fn rollback_to_version(
&self,
model_name: &str,
target_version: &str,
) -> Result<()>
pub async fn rollback_to_version( &self, model_name: &str, target_version: &str, ) -> Result<()>
Rollback to a previous version
Sourcepub async fn archive_version(&self, version_id: Uuid) -> Result<()>
pub async fn archive_version(&self, version_id: Uuid) -> Result<()>
Archive old versions
Sourcepub async fn delete_version(&self, version_id: Uuid) -> Result<()>
pub async fn delete_version(&self, version_id: Uuid) -> Result<()>
Delete a version (permanent)
Sourcepub async fn get_version_stats(&self, model_name: &str) -> Result<VersionStats>
pub async fn get_version_stats(&self, model_name: &str) -> Result<VersionStats>
Get version statistics
Sourcepub fn registry(&self) -> Arc<ModelRegistry>
pub fn registry(&self) -> Arc<ModelRegistry>
Get registry reference
Sourcepub fn storage(&self) -> Arc<dyn ModelStorage>
pub fn storage(&self) -> Arc<dyn ModelStorage>
Get storage reference
Sourcepub fn deployment_manager(&self) -> Arc<DeploymentManager>
pub fn deployment_manager(&self) -> Arc<DeploymentManager>
Get deployment manager reference
Sourcepub fn lifecycle(&self) -> Arc<VersionLifecycle>
pub fn lifecycle(&self) -> Arc<VersionLifecycle>
Get lifecycle manager reference
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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