Class: GEPA::Core::EvaluationBatch

Inherits:
T::Struct
  • Object
show all
Extended by:
T::Sig
Defined in:
lib/gepa/core/evaluation_batch.rb

Overview

Container for evaluating a candidate on a batch.

Instance Method Summary collapse

Constructor Details

#initialize(*args, **kwargs) ⇒ EvaluationBatch

Returns a new instance of EvaluationBatch.

Raises:

  • (ArgumentError)


16
17
18
19
20
21
22
23
# File 'lib/gepa/core/evaluation_batch.rb', line 16

def initialize(*args, **kwargs)
  super
  raise ArgumentError, 'outputs and scores length mismatch' unless outputs.length == scores.length

  if trajectories
    raise ArgumentError, 'trajectories length mismatch' unless trajectories.length == outputs.length
  end
end