Class: GEPA::Strategies::CurrentBestCandidateSelector
- Inherits:
-
Object
- Object
- GEPA::Strategies::CurrentBestCandidateSelector
- Extended by:
- T::Sig
- Defined in:
- lib/gepa/strategies/candidate_selector.rb
Instance Method Summary collapse
-
#initialize(telemetry: nil) ⇒ CurrentBestCandidateSelector
constructor
A new instance of CurrentBestCandidateSelector.
- #select_candidate_idx(state) ⇒ Object
Constructor Details
#initialize(telemetry: nil) ⇒ CurrentBestCandidateSelector
Returns a new instance of CurrentBestCandidateSelector.
59 60 61 |
# File 'lib/gepa/strategies/candidate_selector.rb', line 59 def initialize(telemetry: nil) @telemetry = telemetry end |
Instance Method Details
#select_candidate_idx(state) ⇒ Object
64 65 66 67 68 69 |
# File 'lib/gepa/strategies/candidate_selector.rb', line 64 def select_candidate_idx(state) ensure_lengths!(state) with_span('gepa.strategies.candidate_selector', strategy: 'current_best') do GEPA::Utils::Pareto.idxmax(state.per_program_tracked_scores) end end |