Class: DSPy::Teleprompt::Utils::BootstrapConfig

Inherits:
Object
  • Object
show all
Extended by:
T::Sig
Defined in:
lib/dspy/teleprompt/utils.rb

Overview

Configuration for bootstrap operations

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeBootstrapConfig

Returns a new instance of BootstrapConfig.



42
43
44
45
46
47
48
49
50
# File 'lib/dspy/teleprompt/utils.rb', line 42

def initialize
  @max_bootstrapped_examples = 4
  @max_labeled_examples = 16
  @num_candidate_sets = 10
  @max_errors = 5
  @num_threads = 1
  @success_threshold = 0.8
  @minibatch_size = 50
end

Instance Attribute Details

#max_bootstrapped_examplesObject

Returns the value of attribute max_bootstrapped_examples.



21
22
23
# File 'lib/dspy/teleprompt/utils.rb', line 21

def max_bootstrapped_examples
  @max_bootstrapped_examples
end

#max_errorsObject

Returns the value of attribute max_errors.



30
31
32
# File 'lib/dspy/teleprompt/utils.rb', line 30

def max_errors
  @max_errors
end

#max_labeled_examplesObject

Returns the value of attribute max_labeled_examples.



24
25
26
# File 'lib/dspy/teleprompt/utils.rb', line 24

def max_labeled_examples
  @max_labeled_examples
end

#minibatch_sizeObject

Returns the value of attribute minibatch_size.



39
40
41
# File 'lib/dspy/teleprompt/utils.rb', line 39

def minibatch_size
  @minibatch_size
end

#num_candidate_setsObject

Returns the value of attribute num_candidate_sets.



27
28
29
# File 'lib/dspy/teleprompt/utils.rb', line 27

def num_candidate_sets
  @num_candidate_sets
end

#num_threadsObject

Returns the value of attribute num_threads.



33
34
35
# File 'lib/dspy/teleprompt/utils.rb', line 33

def num_threads
  @num_threads
end

#success_thresholdObject

Returns the value of attribute success_threshold.



36
37
38
# File 'lib/dspy/teleprompt/utils.rb', line 36

def success_threshold
  @success_threshold
end