GEPA.Strategies.EvaluationPolicy.Incremental (GEPA v0.3.0)

Copy Markdown View Source

Incremental evaluation policy - progressively evaluates validation set.

Starts with a small sample and expands for promising candidates. Reduces computation by avoiding full evaluation for poor candidates.

Options

  • :initial_sample_size - Starting sample size (default: 10)
  • :increment_size - Samples to add each time (default: 5)
  • :max_sample_size - Max before full eval (default: 50)
  • :full_eval_threshold - Score threshold for full eval (default: 0.7)
  • :seed - Random seed (default: 0)

Summary

Types

t()

@type t() :: %GEPA.Strategies.EvaluationPolicy.Incremental{
  evaluated_samples: %{required(non_neg_integer()) => MapSet.t()},
  full_eval_threshold: float(),
  increment_size: pos_integer(),
  initial_sample_size: pos_integer(),
  max_sample_size: pos_integer(),
  seed: integer()
}

Functions

calculate_avg_and_coverage(scores)

See GEPA.Strategies.EvaluationPolicy.Full.calculate_avg_and_coverage/1.

get_eval_batch(policy, valset_loader, state, target_program_idx)

@spec get_eval_batch(
  t(),
  GEPA.DataLoader.t(),
  GEPA.State.t(),
  non_neg_integer() | nil
) :: [term()]

new(opts \\ [])

@spec new(keyword()) :: t()

select_samples(policy, candidate_idx, available_samples)

@spec select_samples(t(), non_neg_integer(), [term()]) :: {[term()], t()}

should_do_full_eval?(policy, candidate_idx, partial_score)

@spec should_do_full_eval?(t(), non_neg_integer(), float()) :: boolean()

update_evaluated(policy, candidate_idx, samples)

@spec update_evaluated(t(), non_neg_integer(), [term()]) :: t()