Class: DSPy::Teleprompt::SimpleOptimizer::OptimizerConfig
- Inherits:
-
Config
- Object
- Config
- DSPy::Teleprompt::SimpleOptimizer::OptimizerConfig
- Extended by:
- T::Sig
- Defined in:
- lib/dspy/teleprompt/simple_optimizer.rb
Overview
Configuration specific to simple optimization
Instance Attribute Summary collapse
-
#num_trials ⇒ Object
Returns the value of attribute num_trials.
-
#proposer_config ⇒ Object
Returns the value of attribute proposer_config.
-
#search_strategy ⇒ Object
Returns the value of attribute search_strategy.
-
#use_few_shot_optimization ⇒ Object
Returns the value of attribute use_few_shot_optimization.
-
#use_instruction_optimization ⇒ Object
Returns the value of attribute use_instruction_optimization.
Instance Method Summary collapse
-
#initialize ⇒ OptimizerConfig
constructor
A new instance of OptimizerConfig.
Constructor Details
#initialize ⇒ OptimizerConfig
Returns a new instance of OptimizerConfig.
35 36 37 38 39 40 41 42 |
# File 'lib/dspy/teleprompt/simple_optimizer.rb', line 35 def initialize super @num_trials = 10 @search_strategy = "random" # or "grid" @use_instruction_optimization = true @use_few_shot_optimization = true @proposer_config = DSPy::Propose::GroundedProposer::Config.new end |
Instance Attribute Details
#num_trials ⇒ Object
Returns the value of attribute num_trials.
20 21 22 |
# File 'lib/dspy/teleprompt/simple_optimizer.rb', line 20 def num_trials @num_trials end |
#proposer_config ⇒ Object
Returns the value of attribute proposer_config.
32 33 34 |
# File 'lib/dspy/teleprompt/simple_optimizer.rb', line 32 def proposer_config @proposer_config end |
#search_strategy ⇒ Object
Returns the value of attribute search_strategy.
23 24 25 |
# File 'lib/dspy/teleprompt/simple_optimizer.rb', line 23 def search_strategy @search_strategy end |
#use_few_shot_optimization ⇒ Object
Returns the value of attribute use_few_shot_optimization.
29 30 31 |
# File 'lib/dspy/teleprompt/simple_optimizer.rb', line 29 def use_few_shot_optimization @use_few_shot_optimization end |
#use_instruction_optimization ⇒ Object
Returns the value of attribute use_instruction_optimization.
26 27 28 |
# File 'lib/dspy/teleprompt/simple_optimizer.rb', line 26 def use_instruction_optimization @use_instruction_optimization end |