GEPA.Progress (GEPA v0.3.0)

Copy Markdown View Source

Simple progress display for GEPA optimization.

Provides terminal-based visualization of optimization progress including:

  • Progress bar with percentage (when max_calls known)
  • Spinner for indeterminate progress
  • Real-time score and Pareto size display
  • ETA estimation
  • Colored status indicators

Usage

# Enable progress display
{:ok, result} = GEPA.optimize(
  # ... options ...
  progress: true
)

# Or with custom configuration
{:ok, result} = GEPA.optimize(
  # ... options ...
  progress: [width: 60, color: true]
)

Options

  • :max_calls - Maximum number of metric calls (for progress bar)
  • :width - Progress bar width in characters (default: 40)
  • :color - Enable/disable ANSI colors (default: auto-detect)

Summary

Functions

Display optimization completion summary.

Create a new progress tracker.

Display optimization start banner.

Update progress display for an iteration.

Types

t()

@type t() :: %GEPA.Progress{
  color: boolean(),
  last_update: integer(),
  max_calls: pos_integer() | nil,
  start_time: integer(),
  width: pos_integer()
}

Functions

finish(progress, result)

@spec finish(t(), GEPA.Result.t()) :: :ok

Display optimization completion summary.

new(opts \\ [])

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

Create a new progress tracker.

Options

  • :max_calls - Maximum metric calls (enables progress bar)
  • :width - Bar width in characters (default: 40)
  • :color - Enable colors (default: auto-detect TTY)

start(progress)

@spec start(t()) :: :ok

Display optimization start banner.

update(progress, metrics)

@spec update(t(), map()) :: t()

Update progress display for an iteration.

Metrics Map

  • :iteration - Current iteration number
  • :best_score - Best score achieved so far
  • :pareto_size - Number of programs on Pareto front
  • :total_evals - Total metric evaluations
  • :accepted - Whether last proposal was accepted (true/false/nil)
  • :proposal_type - Type of proposal ("reflective", "merge", etc.)