Skip to main content

evaluate_child

Function evaluate_child 

pub fn evaluate_child(inputs: &ChildInputs) -> Result<f64>
Expand description

Evaluates one trial replicate and returns its objective value.

Writes the materialized trial config under ChildInputs::run_root, runs oniro_cli run --config <trial>, then reads the objective from the chosen source. A non-zero oniro exit becomes a SpikeError::Oniro — which the binary turns into a non-zero exit, so the executor records the trial as failed (a diverged training), never a panic.

§Errors

SpikeError::Materialize if the trial config cannot be built, SpikeError::Io on a filesystem fault, and SpikeError::Oniro if oniro_cli exits non-zero or its output does not carry the expected objective.