Skip to main content

TrialExecutor

Trait TrialExecutor 

Source
pub trait TrialExecutor: Send + Sync {
    // Required method
    fn execute_trial(
        &self,
        params: &HashMap<String, Value>,
    ) -> Result<TrialOutcome>;
}
Expand description

Callback that executes a trial given sampled parameters.

Returns Ok(TrialOutcome) for normal completion or pruning, Err(SomaError) only for unexpected failures.

Required Methods§

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§