pub struct MLApiPatterns;Expand description
Common ML API patterns
Implementations§
Source§impl MLApiPatterns
impl MLApiPatterns
Sourcepub fn prediction_request<T: Serialize>(
service: &ApiService,
endpoint: &str,
features: &T,
) -> Result<RequestBuilder, ApiError>
pub fn prediction_request<T: Serialize>( service: &ApiService, endpoint: &str, features: &T, ) -> Result<RequestBuilder, ApiError>
Create a prediction request pattern
Sourcepub fn batch_prediction_request<T: Serialize>(
service: &ApiService,
endpoint: &str,
batch_features: &[T],
) -> Result<RequestBuilder, ApiError>
pub fn batch_prediction_request<T: Serialize>( service: &ApiService, endpoint: &str, batch_features: &[T], ) -> Result<RequestBuilder, ApiError>
Create a batch prediction request pattern
Sourcepub fn training_request<T: Serialize>(
service: &ApiService,
endpoint: &str,
training_data: &T,
model_config: &HashMap<String, Value>,
) -> Result<RequestBuilder, ApiError>
pub fn training_request<T: Serialize>( service: &ApiService, endpoint: &str, training_data: &T, model_config: &HashMap<String, Value>, ) -> Result<RequestBuilder, ApiError>
Create a model training request pattern
Sourcepub fn model_status_request(
service: &ApiService,
model_id: &str,
) -> RequestBuilder
pub fn model_status_request( service: &ApiService, model_id: &str, ) -> RequestBuilder
Create a model status check pattern
Sourcepub fn health_check_request(service: &ApiService) -> RequestBuilder
pub fn health_check_request(service: &ApiService) -> RequestBuilder
Create a health check pattern
Auto Trait Implementations§
impl Freeze for MLApiPatterns
impl RefUnwindSafe for MLApiPatterns
impl Send for MLApiPatterns
impl Sync for MLApiPatterns
impl Unpin for MLApiPatterns
impl UnwindSafe for MLApiPatterns
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> 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