Parent Class
Parameter search base class.
BcoParameterSearch
Bases: ABC
Parent class that lays the foundation for the specific parameter search classes. This class shouldn't be instantiated directly.
Attributes:
Name | Type | Description |
---|---|---|
_files |
list[str]
|
The files search space. |
_loaders |
list[str]
|
The data loaders search space. |
_chunking_configs |
list[str]
|
The chunking strategies search space. |
_embedding_models |
list[str]
|
The embedding models search space. |
_vector_stores |
list[str]
|
The vector stores search space. |
_similarity_top_k |
list[int]
|
The similarity top k search space. |
_llms |
list[str]
|
The LLM search space. |
_git_data |
Optional[list[GitDataFileConfig]]
|
The git data to associate with test runs. |
_verbose |
bool
|
Parameter search verbosity mode. |
_logger |
Logger
|
The logger to use. |
backoff_time |
int | float
|
The backoff time between runs. Uses exponential backoff time. |
delay_reset |
int
|
The amount of runs in between resetting the backoff time. |
Source code in parameter_search/parameter_search.py
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 |
|
__init__(search_space, verbose=True)
Constructor.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
search_space |
SearchSpace
|
The parameter search space. |
required |
verbose |
bool
|
The verbosity level. False for no output, True for running output. |
True
|
Source code in parameter_search/parameter_search.py
train()
Starts the generation workflow.
Source code in parameter_search/parameter_search.py
_setup_logger(path, name)
abstractmethod
_create_param_sets()
abstractmethod
_generate_domains(bcorag)
Performs the bcorag query on each domain.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
bcorag |
BcoRag
|
The setup BcoRag instance. |
required |
Source code in parameter_search/parameter_search.py
_create_bcorag(user_selections)
Creates the BcoRag instance.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
user_selections |
UserSelections
|
The parameter set. |
required |
Returns:
Type | Description |
---|---|
BcoRag
|
The instantiated BcoRag instance. |
Source code in parameter_search/parameter_search.py
_log_output(message)
Handles output. If the logger was passed in handles logging, if
verbose is True
handles printing (only info level logging).
Parameters:
Name | Type | Description | Default |
---|---|---|---|
message |
str | UserSelections
|
The message or param set to log and/or print. |
required |