From dce26fdbdfc45fd824746e0e453de7f79c45de2e Mon Sep 17 00:00:00 2001 From: Jan Van Looy Date: Wed, 10 Jan 2024 16:29:41 +0100 Subject: [PATCH] Some small code improvements --- src/parameter_search.ipynb | 8 ++++---- src/utils.py | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/parameter_search.ipynb b/src/parameter_search.ipynb index 54999d2..ff49169 100644 --- a/src/parameter_search.ipynb +++ b/src/parameter_search.ipynb @@ -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", diff --git a/src/utils.py b/src/utils.py index 24ff84c..c7f5945 100644 --- a/src/utils.py +++ b/src/utils.py @@ -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: