Class: DSPy::Storage::StorageManager::StorageConfig
- Inherits:
-
Object
- Object
- DSPy::Storage::StorageManager::StorageConfig
- Extended by:
- T::Sig
- Defined in:
- lib/dspy/storage/storage_manager.rb
Overview
Configuration for storage behavior
Instance Attribute Summary collapse
-
#auto_save ⇒ Object
Returns the value of attribute auto_save.
-
#compress_old_programs ⇒ Object
Returns the value of attribute compress_old_programs.
-
#max_stored_programs ⇒ Object
Returns the value of attribute max_stored_programs.
-
#save_intermediate_results ⇒ Object
Returns the value of attribute save_intermediate_results.
-
#storage_path ⇒ Object
Returns the value of attribute storage_path.
Instance Method Summary collapse
-
#initialize ⇒ StorageConfig
constructor
A new instance of StorageConfig.
- #to_h ⇒ Object
Constructor Details
#initialize ⇒ StorageConfig
Returns a new instance of StorageConfig.
33 34 35 36 37 38 39 |
# File 'lib/dspy/storage/storage_manager.rb', line 33 def initialize @storage_path = "./dspy_storage" @auto_save = true @save_intermediate_results = false @max_stored_programs = 100 @compress_old_programs = false end |
Instance Attribute Details
#auto_save ⇒ Object
Returns the value of attribute auto_save.
21 22 23 |
# File 'lib/dspy/storage/storage_manager.rb', line 21 def auto_save @auto_save end |
#compress_old_programs ⇒ Object
Returns the value of attribute compress_old_programs.
30 31 32 |
# File 'lib/dspy/storage/storage_manager.rb', line 30 def compress_old_programs @compress_old_programs end |
#max_stored_programs ⇒ Object
Returns the value of attribute max_stored_programs.
27 28 29 |
# File 'lib/dspy/storage/storage_manager.rb', line 27 def max_stored_programs @max_stored_programs end |
#save_intermediate_results ⇒ Object
Returns the value of attribute save_intermediate_results.
24 25 26 |
# File 'lib/dspy/storage/storage_manager.rb', line 24 def save_intermediate_results @save_intermediate_results end |
#storage_path ⇒ Object
Returns the value of attribute storage_path.
18 19 20 |
# File 'lib/dspy/storage/storage_manager.rb', line 18 def storage_path @storage_path end |
Instance Method Details
#to_h ⇒ Object
42 43 44 45 46 47 48 49 50 |
# File 'lib/dspy/storage/storage_manager.rb', line 42 def to_h { storage_path: @storage_path, auto_save: @auto_save, save_intermediate_results: @save_intermediate_results, max_stored_programs: @max_stored_programs, compress_old_programs: @compress_old_programs } end |