pub struct VersionedABTestManager { /* private fields */ }Expand description
Enhanced A/B testing manager with versioning integration
Implementations§
Source§impl VersionedABTestManager
impl VersionedABTestManager
Sourcepub fn new(version_manager: Arc<ModelVersionManager>) -> Self
pub fn new(version_manager: Arc<ModelVersionManager>) -> Self
Create a new versioned A/B test manager
Sourcepub async fn create_version_experiment(
&self,
config: VersionExperimentConfig,
) -> Result<String>
pub async fn create_version_experiment( &self, config: VersionExperimentConfig, ) -> Result<String>
Create an A/B test between model versions
Sourcepub async fn route_request(
&self,
experiment_id: &str,
user_id: &str,
) -> Result<ModelRoutingResult>
pub async fn route_request( &self, experiment_id: &str, user_id: &str, ) -> Result<ModelRoutingResult>
Route a request to the appropriate model version
Sourcepub async fn record_version_metric(
&self,
experiment_id: &str,
user_id: &str,
metric_type: VersionMetricType,
value: f64,
metadata: Option<HashMap<String, String>>,
) -> Result<()>
pub async fn record_version_metric( &self, experiment_id: &str, user_id: &str, metric_type: VersionMetricType, value: f64, metadata: Option<HashMap<String, String>>, ) -> Result<()>
Record metrics for a versioned experiment
Sourcepub async fn analyze_version_experiment(
&self,
experiment_id: &str,
) -> Result<VersionExperimentResult>
pub async fn analyze_version_experiment( &self, experiment_id: &str, ) -> Result<VersionExperimentResult>
Analyze experiment results with version context
Sourcepub async fn promote_winning_version(
&self,
experiment_id: &str,
) -> Result<PromotionResult>
pub async fn promote_winning_version( &self, experiment_id: &str, ) -> Result<PromotionResult>
Promote winning version based on experiment results
Sourcepub async fn list_experiments(&self) -> Result<Vec<VersionedExperiment>>
pub async fn list_experiments(&self) -> Result<Vec<VersionedExperiment>>
List active versioned experiments
Sourcepub async fn stop_experiment(&self, experiment_id: &str) -> Result<()>
pub async fn stop_experiment(&self, experiment_id: &str) -> Result<()>
Stop a versioned experiment
Auto Trait Implementations§
impl !Freeze for VersionedABTestManager
impl !RefUnwindSafe for VersionedABTestManager
impl Send for VersionedABTestManager
impl Sync for VersionedABTestManager
impl Unpin for VersionedABTestManager
impl UnsafeUnpin for VersionedABTestManager
impl !UnwindSafe for VersionedABTestManager
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