EngineConfig¶
gepa.gepa_launcher.EngineConfig(run_dir: str | None = None, seed: int = 0, display_progress_bar: bool = False, raise_on_exception: bool = True, use_cloudpickle: bool = True, track_best_outputs: bool = True, write_agent_state: bool = False, max_metric_calls: int | None = None, max_candidate_proposals: int | None = None, max_reflection_cost: float | None = None, stop_at_score: float | None = None, val_evaluation_policy: EvaluationPolicy | Literal['full_eval'] = 'full_eval', candidate_selection_strategy: CandidateSelector | Literal['pareto', 'current_best', 'epsilon_greedy', 'top_k_pareto'] = 'pareto', frontier_type: FrontierType = 'hybrid', acceptance_criterion: AcceptanceCriterion | Literal['strict_improvement', 'improvement_or_equal'] = 'strict_improvement', parallel: bool = True, max_workers: int | None = (lambda: os.cpu_count() or 32)(), cache_evaluation: bool = False, cache_evaluation_storage: CacheEvaluationStorage = 'auto', best_example_evals_k: int = 30, capture_stdio: bool = False, sampling_strategy: SamplingStrategy | None = None, selection_strategy: SelectionStrategy | None = None)
dataclass
¶
Controls the optimization run loop: budget, parallelism, caching, and stopping.
Most users only need to set max_metric_calls (evaluation budget).
Parallel evaluation is enabled by default with max_workers set to
os.cpu_count() or 32 (CPU count when available, otherwise 32).
Set capture_stdio=True to automatically route any print() output
inside your evaluator into ASI (under "stdout"/"stderr" keys),
with no code changes needed. Useful for quick prototyping or wrapping
existing evaluation scripts that already have print statements.
Attributes¶
run_dir: str | None = None
class-attribute
instance-attribute
¶
seed: int = 0
class-attribute
instance-attribute
¶
display_progress_bar: bool = False
class-attribute
instance-attribute
¶
raise_on_exception: bool = True
class-attribute
instance-attribute
¶
use_cloudpickle: bool = True
class-attribute
instance-attribute
¶
track_best_outputs: bool = True
class-attribute
instance-attribute
¶
write_agent_state: bool = False
class-attribute
instance-attribute
¶
max_metric_calls: int | None = None
class-attribute
instance-attribute
¶
max_candidate_proposals: int | None = None
class-attribute
instance-attribute
¶
max_reflection_cost: float | None = None
class-attribute
instance-attribute
¶
stop_at_score: float | None = None
class-attribute
instance-attribute
¶
Stop once the best valset aggregate score reaches this threshold.