pub struct EngineConfig {
pub input_dim: usize,
pub output_dim: usize,
pub context: ContextConfig,
pub apply_constraints: bool,
pub sampling: SamplingConfig,
pub use_embeddings: bool,
pub inference_mode: InferenceMode,
pub state_prune_threshold: f32,
pub max_history_length: Option<usize>,
}Expand description
Configuration for the inference engine
Fields§
§input_dim: usizeInput dimension
output_dim: usizeOutput dimension
context: ContextConfigContext configuration
apply_constraints: boolWhether to apply constraints
sampling: SamplingConfigSampling configuration
use_embeddings: boolWhether to use embeddings (for discrete outputs)
inference_mode: InferenceModeInference mode for memory efficiency
state_prune_threshold: f32State pruning threshold (for LowMemory mode) States with values below this threshold are zeroed out
max_history_length: Option<usize>Maximum history length (for LowMemory/Streaming modes)
Implementations§
Source§impl EngineConfig
impl EngineConfig
Sourcepub fn context(self, config: ContextConfig) -> Self
pub fn context(self, config: ContextConfig) -> Self
Set context configuration
Sourcepub fn apply_constraints(self, apply: bool) -> Self
pub fn apply_constraints(self, apply: bool) -> Self
Enable/disable constraint enforcement
Sourcepub fn sampling(self, sampling: SamplingConfig) -> Self
pub fn sampling(self, sampling: SamplingConfig) -> Self
Set sampling configuration
Sourcepub fn use_embeddings(self, use_emb: bool) -> Self
pub fn use_embeddings(self, use_emb: bool) -> Self
Enable embeddings for discrete outputs
Sourcepub fn inference_mode(self, mode: InferenceMode) -> Self
pub fn inference_mode(self, mode: InferenceMode) -> Self
Set inference mode for memory efficiency
Sourcepub fn state_prune_threshold(self, threshold: f32) -> Self
pub fn state_prune_threshold(self, threshold: f32) -> Self
Set state pruning threshold
Sourcepub fn max_history_length(self, length: usize) -> Self
pub fn max_history_length(self, length: usize) -> Self
Set maximum history length
Trait Implementations§
Source§impl Clone for EngineConfig
impl Clone for EngineConfig
Source§fn clone(&self) -> EngineConfig
fn clone(&self) -> EngineConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for EngineConfig
impl Debug for EngineConfig
Source§impl Default for EngineConfig
impl Default for EngineConfig
Source§impl<'de> Deserialize<'de> for EngineConfig
impl<'de> Deserialize<'de> for EngineConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for EngineConfig
impl RefUnwindSafe for EngineConfig
impl Send for EngineConfig
impl Sync for EngineConfig
impl Unpin for EngineConfig
impl UnwindSafe for EngineConfig
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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