Dsxir. Optimizer. GEPA. Pareto
(dsxir v0.4.0)
Copy Markdown
Per-example Pareto frontier and parent selection for GEPA.
Dominance is over the per-example score axis. nil slots (a failed
evaluation on that example) act as -:infinity so an individual that errors
on any example is strictly worse than any non-erroring competitor on that
axis.
Summary
Functions
Returns the list of individual ids that are best on at least one devset example. Ties are broken by birth order (oldest wins, deterministic).
Weighted random parent: weight ∝ number of devset examples this individual
is best on. Falls back to uniform sample from frontier_ids if all weights
are zero (impossible by construction but defensive).
Same as frontier/1 but answers whether candidate would join when added.
Computes a synthetic frontier including candidate against pop's current
members and checks membership.
Functions
@spec dominates?( Dsxir.Optimizer.GEPA.Individual.t(), Dsxir.Optimizer.GEPA.Individual.t() ) :: boolean()
@spec frontier(Dsxir.Optimizer.GEPA.Population.t()) :: [ Dsxir.Optimizer.GEPA.Individual.id() ]
Returns the list of individual ids that are best on at least one devset example. Ties are broken by birth order (oldest wins, deterministic).
@spec select_parent( Dsxir.Optimizer.GEPA.Population.t(), [Dsxir.Optimizer.GEPA.Individual.id()], rng :: term() ) :: {Dsxir.Optimizer.GEPA.Individual.t(), rng :: term()}
Weighted random parent: weight ∝ number of devset examples this individual
is best on. Falls back to uniform sample from frontier_ids if all weights
are zero (impossible by construction but defensive).
@spec would_join_frontier?( Dsxir.Optimizer.GEPA.Population.t(), Dsxir.Optimizer.GEPA.Individual.t() ) :: boolean()
Same as frontier/1 but answers whether candidate would join when added.
Computes a synthetic frontier including candidate against pop's current
members and checks membership.