CloudService

Trait CloudService 

Source
pub trait CloudService: Send + Sync {
Show 13 methods // Required methods fn deploy_model<'life0, 'life1, 'async_trait>( &'life0 self, _deployment_config: &'life1 DeploymentConfig, ) -> Pin<Box<dyn Future<Output = Result<DeploymentResult>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn get_endpoint<'life0, 'life1, 'async_trait>( &'life0 self, deployment_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<EndpointInfo>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn scale_deployment<'life0, 'life1, 'async_trait>( &'life0 self, deployment_id: &'life1 str, target_instances: u32, ) -> Pin<Box<dyn Future<Output = Result<ScalingResult>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn get_metrics<'life0, 'life1, 'async_trait>( &'life0 self, deployment_id: &'life1 str, time_range: (DateTime<Utc>, DateTime<Utc>), ) -> Pin<Box<dyn Future<Output = Result<DeploymentMetrics>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn update_deployment<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, deployment_id: &'life1 str, config: &'life2 DeploymentConfig, ) -> Pin<Box<dyn Future<Output = Result<UpdateResult>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait; fn delete_deployment<'life0, 'life1, 'async_trait>( &'life0 self, deployment_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn list_deployments<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Vec<DeploymentInfo>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn estimate_costs<'life0, 'life1, 'async_trait>( &'life0 self, config: &'life1 DeploymentConfig, _duration_hours: u32, ) -> Pin<Box<dyn Future<Output = Result<CostEstimate>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn deploy_serverless_function<'life0, 'life1, 'async_trait>( &'life0 self, function_config: &'life1 ServerlessFunctionConfig, ) -> Pin<Box<dyn Future<Output = Result<ServerlessDeploymentResult>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn invoke_function<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, _function_name: &'life1 str, payload: &'life2 [u8], ) -> Pin<Box<dyn Future<Output = Result<FunctionInvocationResult>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait; fn create_gpu_cluster<'life0, 'life1, 'async_trait>( &'life0 self, cluster_config: &'life1 GPUClusterConfig, ) -> Pin<Box<dyn Future<Output = Result<GPUClusterResult>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn manage_storage<'life0, 'life1, 'async_trait>( &'life0 self, storage_config: &'life1 StorageConfig, ) -> Pin<Box<dyn Future<Output = Result<StorageResult>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn optimize_costs<'life0, 'life1, 'async_trait>( &'life0 self, optimization_config: &'life1 CostOptimizationStrategy, ) -> Pin<Box<dyn Future<Output = Result<CostOptimizationResult>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait;
}
Expand description

Cloud service trait

Required Methods§

Source

fn deploy_model<'life0, 'life1, 'async_trait>( &'life0 self, _deployment_config: &'life1 DeploymentConfig, ) -> Pin<Box<dyn Future<Output = Result<DeploymentResult>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Deploy model to cloud service

Source

fn get_endpoint<'life0, 'life1, 'async_trait>( &'life0 self, deployment_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<EndpointInfo>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Get inference endpoint

Source

fn scale_deployment<'life0, 'life1, 'async_trait>( &'life0 self, deployment_id: &'life1 str, target_instances: u32, ) -> Pin<Box<dyn Future<Output = Result<ScalingResult>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Scale deployment

Source

fn get_metrics<'life0, 'life1, 'async_trait>( &'life0 self, deployment_id: &'life1 str, time_range: (DateTime<Utc>, DateTime<Utc>), ) -> Pin<Box<dyn Future<Output = Result<DeploymentMetrics>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Get deployment metrics

Source

fn update_deployment<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, deployment_id: &'life1 str, config: &'life2 DeploymentConfig, ) -> Pin<Box<dyn Future<Output = Result<UpdateResult>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Update deployment configuration

Source

fn delete_deployment<'life0, 'life1, 'async_trait>( &'life0 self, deployment_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Delete deployment

Source

fn list_deployments<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Vec<DeploymentInfo>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

List deployments

Source

fn estimate_costs<'life0, 'life1, 'async_trait>( &'life0 self, config: &'life1 DeploymentConfig, _duration_hours: u32, ) -> Pin<Box<dyn Future<Output = Result<CostEstimate>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Get cost estimates

Source

fn deploy_serverless_function<'life0, 'life1, 'async_trait>( &'life0 self, function_config: &'life1 ServerlessFunctionConfig, ) -> Pin<Box<dyn Future<Output = Result<ServerlessDeploymentResult>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Deploy serverless function

Source

fn invoke_function<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, _function_name: &'life1 str, payload: &'life2 [u8], ) -> Pin<Box<dyn Future<Output = Result<FunctionInvocationResult>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Invoke serverless function

Source

fn create_gpu_cluster<'life0, 'life1, 'async_trait>( &'life0 self, cluster_config: &'life1 GPUClusterConfig, ) -> Pin<Box<dyn Future<Output = Result<GPUClusterResult>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Create GPU cluster

Source

fn manage_storage<'life0, 'life1, 'async_trait>( &'life0 self, storage_config: &'life1 StorageConfig, ) -> Pin<Box<dyn Future<Output = Result<StorageResult>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Manage storage resources

Source

fn optimize_costs<'life0, 'life1, 'async_trait>( &'life0 self, optimization_config: &'life1 CostOptimizationStrategy, ) -> Pin<Box<dyn Future<Output = Result<CostOptimizationResult>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Optimize costs with spot instances and reserved capacity

Implementors§