Skip to main content

ModelExecutorFactory

Trait ModelExecutorFactory 

Source
pub trait ModelExecutorFactory: Send + Sync {
    // Required methods
    fn create_executor<'life0, 'life1, 'async_trait>(
        &'life0 self,
        config: &'life1 ExecutorConfig,
    ) -> Pin<Box<dyn Future<Output = Result<Box<dyn ModelExecutor>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn create_batch_executor<'life0, 'life1, 'async_trait>(
        &'life0 self,
        config: &'life1 ExecutorConfig,
    ) -> Pin<Box<dyn Future<Output = Result<Box<dyn BatchModelExecutor>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn supported_types(&self) -> Vec<ExecutorType>;
    fn validate_config(&self, config: &ExecutorConfig) -> Result<()>;
}
Expand description

Model executor factory

Required Methods§

Source

fn create_executor<'life0, 'life1, 'async_trait>( &'life0 self, config: &'life1 ExecutorConfig, ) -> Pin<Box<dyn Future<Output = Result<Box<dyn ModelExecutor>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Create executor from model configuration

Source

fn create_batch_executor<'life0, 'life1, 'async_trait>( &'life0 self, config: &'life1 ExecutorConfig, ) -> Pin<Box<dyn Future<Output = Result<Box<dyn BatchModelExecutor>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Create batch executor

Source

fn supported_types(&self) -> Vec<ExecutorType>

Get supported executor types

Source

fn validate_config(&self, config: &ExecutorConfig) -> Result<()>

Validate configuration

Implementors§