somatize_runtime/runner/
mod.rs1pub mod local;
8pub mod pbt;
9pub mod stream;
10pub mod study;
11
12use somatize_compiler::ExecutionPlan;
13use somatize_core::cache::CacheStore;
14use somatize_core::error::Result;
15use somatize_core::value::Value;
16use std::collections::HashMap;
17
18use crate::EventBus;
19use crate::filter_library::FilterLibrary;
20use std::sync::Arc;
21
22pub trait Runner: Send + Sync {
25 fn fit(
28 &self,
29 plan: &ExecutionPlan,
30 filters: &FilterLibrary,
31 cache: &dyn CacheStore,
32 event_bus: &Arc<EventBus>,
33 input: &Value,
34 y: Option<&Value>,
35 ) -> Result<(Value, HashMap<String, Value>)>;
36
37 fn forward(
39 &self,
40 plan: &ExecutionPlan,
41 filters: &FilterLibrary,
42 cache: &dyn CacheStore,
43 event_bus: &Arc<EventBus>,
44 input: &Value,
45 ) -> Result<Value>;
46}
47
48pub use local::LocalRunner;
49pub use pbt::{FnPbtExecutor, PbtConfig, PbtExecutor, PbtRunner, PopulationMember};
50pub use stream::{FittedFilter, StreamExecutor};
51pub use study::{FnTrialExecutor, StudyRunner, TrialExecutor, TrialOutcome};