Skip to content

ProposeNewCandidate

gepa.proposer.base.ProposeNewCandidate

Bases: Protocol[DataId]

Strategy that receives the current optimizer state and proposes a new candidate or returns None. It may compute subsample evaluations, set trace fields in state, etc. The engine will handle acceptance and full eval unless the strategy already did those and encoded in metadata.

Functions

propose(state: GEPAState[Any, DataId]) -> CandidateProposal | None

Source code in gepa/proposer/base.py
def propose(self, state: GEPAState[Any, DataId]) -> CandidateProposal | None: ...