Class: DSPy::Teleprompt::Teleprompter::Config
- Inherits:
-
Object
- Object
- DSPy::Teleprompt::Teleprompter::Config
- Extended by:
- T::Sig
- Defined in:
- lib/dspy/teleprompt/teleprompter.rb
Overview
Configuration for optimization runs
Instance Attribute Summary collapse
-
#max_bootstrapped_examples ⇒ Object
Returns the value of attribute max_bootstrapped_examples.
-
#max_errors ⇒ Object
Returns the value of attribute max_errors.
-
#max_labeled_examples ⇒ Object
Returns the value of attribute max_labeled_examples.
-
#num_candidate_examples ⇒ Object
Returns the value of attribute num_candidate_examples.
-
#num_threads ⇒ Object
Returns the value of attribute num_threads.
-
#require_validation_examples ⇒ Object
Returns the value of attribute require_validation_examples.
-
#save_intermediate_results ⇒ Object
Returns the value of attribute save_intermediate_results.
-
#save_path ⇒ Object
Returns the value of attribute save_path.
Instance Method Summary collapse
-
#initialize ⇒ Config
constructor
A new instance of Config.
- #to_h ⇒ Object
Constructor Details
#initialize ⇒ Config
Returns a new instance of Config.
43 44 45 46 47 48 49 50 51 52 |
# File 'lib/dspy/teleprompt/teleprompter.rb', line 43 def initialize @max_bootstrapped_examples = 4 @max_labeled_examples = 16 @num_candidate_examples = 50 @num_threads = 1 @max_errors = 5 @require_validation_examples = true @save_intermediate_results = false @save_path = nil end |
Instance Attribute Details
#max_bootstrapped_examples ⇒ Object
Returns the value of attribute max_bootstrapped_examples.
19 20 21 |
# File 'lib/dspy/teleprompt/teleprompter.rb', line 19 def max_bootstrapped_examples @max_bootstrapped_examples end |
#max_errors ⇒ Object
Returns the value of attribute max_errors.
31 32 33 |
# File 'lib/dspy/teleprompt/teleprompter.rb', line 31 def max_errors @max_errors end |
#max_labeled_examples ⇒ Object
Returns the value of attribute max_labeled_examples.
22 23 24 |
# File 'lib/dspy/teleprompt/teleprompter.rb', line 22 def max_labeled_examples @max_labeled_examples end |
#num_candidate_examples ⇒ Object
Returns the value of attribute num_candidate_examples.
25 26 27 |
# File 'lib/dspy/teleprompt/teleprompter.rb', line 25 def num_candidate_examples @num_candidate_examples end |
#num_threads ⇒ Object
Returns the value of attribute num_threads.
28 29 30 |
# File 'lib/dspy/teleprompt/teleprompter.rb', line 28 def num_threads @num_threads end |
#require_validation_examples ⇒ Object
Returns the value of attribute require_validation_examples.
34 35 36 |
# File 'lib/dspy/teleprompt/teleprompter.rb', line 34 def require_validation_examples @require_validation_examples end |
#save_intermediate_results ⇒ Object
Returns the value of attribute save_intermediate_results.
37 38 39 |
# File 'lib/dspy/teleprompt/teleprompter.rb', line 37 def save_intermediate_results @save_intermediate_results end |
#save_path ⇒ Object
Returns the value of attribute save_path.
40 41 42 |
# File 'lib/dspy/teleprompt/teleprompter.rb', line 40 def save_path @save_path end |
Instance Method Details
#to_h ⇒ Object
55 56 57 58 59 60 61 62 63 64 65 66 |
# File 'lib/dspy/teleprompt/teleprompter.rb', line 55 def to_h { max_bootstrapped_examples: @max_bootstrapped_examples, max_labeled_examples: @max_labeled_examples, num_candidate_examples: @num_candidate_examples, num_threads: @num_threads, max_errors: @max_errors, require_validation_examples: @require_validation_examples, save_intermediate_results: @save_intermediate_results, save_path: @save_path } end |