Class: DSPy::Storage::StorageManager::StorageConfig

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

Overview

Configuration for storage behavior

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeStorageConfig

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_saveObject

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_programsObject

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_programsObject

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_resultsObject

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_pathObject

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_hObject



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