Dsxir.Optimizer.SIMBA (dsxir v0.5.0)

Copy Markdown

Stochastic Introspective Mini-Batch Ascent. Implements @behaviour Dsxir.Optimizer and the four checkpointable callbacks, so it drops into Dsxir.OptimizerSession exactly the way GEPA and MIPROv2 do.

Each step/6 is one mini-batch trajectory-sampling iteration driven by Dsxir.Optimizer.SIMBA.Trial. init_session/4 plants the student as pool index 0 and shuffles the trainset cursor. See Dsxir.Optimizer.SIMBA.Auto for :auto presets.

Options

  • :auto (default :medium) - preset for bsize, num_candidates, max_steps, max_demos. :light | :medium | :heavy.
  • :seed (default 0) - RNG seed; makes a run deterministic.
  • Any preset key - overrides the preset.

Summary

Functions

Projects sampler state into a Dsxir.Optimizer.SIMBA.Stats record.

Like compile/4 but raises the validation exception on {:error, _}.

Single mini-batch step. Returns {:cont, sampler, trial} while budget remains, or {:halt, sampler, :budget_exhausted} once attempts reaches total_planned_trials on entry. Mirrors Dsxir.Optimizer.GEPA.step/6.

Functions

build_stats(s)

Projects sampler state into a Dsxir.Optimizer.SIMBA.Stats record.

compile!(student, trainset, metric, opts)

Like compile/4 but raises the validation exception on {:error, _}.

step(sampler, trial_idx, student, trainset, metric, opts)

Single mini-batch step. Returns {:cont, sampler, trial} while budget remains, or {:halt, sampler, :budget_exhausted} once attempts reaches total_planned_trials on entry. Mirrors Dsxir.Optimizer.GEPA.step/6.