Skip to content

Commit

Permalink
Some small code improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
janvanlooyml6 committed Jan 10, 2024
1 parent f9067c8 commit dce26fd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/parameter_search.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -306,14 +306,14 @@
"outputs": [],
"source": [
"searchable_index_params = {\n",
" 'chunk_size' : [384],\n",
" 'chunk_overlap' : [128],\n",
" 'chunk_size' : [192, 256, 320],\n",
" 'chunk_overlap' : [64, 128, 192],\n",
"}\n",
"searchable_shared_params = {\n",
" 'embed_model' : [(\"huggingface\", \"BAAI/bge-base-en-v1.5\")]\n",
" 'embed_model' : [(\"huggingface\",\"all-MiniLM-L6-v2\"), (\"huggingface\", \"BAAI/bge-base-en-v1.5\")]\n",
"}\n",
"searchable_eval_params = {\n",
" 'retrieval_top_k' : [2]\n",
" 'retrieval_top_k' : [2, 4, 8]\n",
"}\n",
"\n",
"search_method = 'progressive_search' # 'grid_search', 'progressive_search'\n",
Expand Down
2 changes: 1 addition & 1 deletion src/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ def create_configs(self, runcount):

# if there are no variations to try, just schedule one run
if len(variations_to_try) == 0:
variations_to_try = [{next(iter(pipeline_config.items()))[0] : next(iter(pipeline_config.items()))[1]}]
variations_to_try = [{list(pipeline_config.keys())[0]: list(pipeline_config.values())[0]}]

# when all variations have been tried, stop searching
if runcount > len(variations_to_try) - 1:
Expand Down

0 comments on commit dce26fd

Please sign in to comment.