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.
44 45 46 47 48 49 50 51 52 53 |
# File 'lib/dspy/teleprompt/teleprompter.rb', line 44 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.
20 21 22 |
# File 'lib/dspy/teleprompt/teleprompter.rb', line 20 def max_bootstrapped_examples @max_bootstrapped_examples end |
#max_errors ⇒ Object
Returns the value of attribute max_errors.
32 33 34 |
# File 'lib/dspy/teleprompt/teleprompter.rb', line 32 def max_errors @max_errors end |
#max_labeled_examples ⇒ Object
Returns the value of attribute max_labeled_examples.
23 24 25 |
# File 'lib/dspy/teleprompt/teleprompter.rb', line 23 def max_labeled_examples @max_labeled_examples end |
#num_candidate_examples ⇒ Object
Returns the value of attribute num_candidate_examples.
26 27 28 |
# File 'lib/dspy/teleprompt/teleprompter.rb', line 26 def num_candidate_examples @num_candidate_examples end |
#num_threads ⇒ Object
Returns the value of attribute num_threads.
29 30 31 |
# File 'lib/dspy/teleprompt/teleprompter.rb', line 29 def num_threads @num_threads end |
#require_validation_examples ⇒ Object
Returns the value of attribute require_validation_examples.
35 36 37 |
# File 'lib/dspy/teleprompt/teleprompter.rb', line 35 def require_validation_examples @require_validation_examples end |
#save_intermediate_results ⇒ Object
Returns the value of attribute save_intermediate_results.
38 39 40 |
# File 'lib/dspy/teleprompt/teleprompter.rb', line 38 def save_intermediate_results @save_intermediate_results end |
#save_path ⇒ Object
Returns the value of attribute save_path.
41 42 43 |
# File 'lib/dspy/teleprompt/teleprompter.rb', line 41 def save_path @save_path end |
Instance Method Details
#to_h ⇒ Object
56 57 58 59 60 61 62 63 64 65 66 67 |
# File 'lib/dspy/teleprompt/teleprompter.rb', line 56 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 |