Skip to content

Commit

Permalink
Tiny fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
janvanlooyml6 committed Jan 18, 2024
1 parent 3466a73 commit a374891
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
8 changes: 4 additions & 4 deletions src/parameter_search.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -320,11 +320,11 @@
"outputs": [],
"source": [
"searchable_index_params = {\n",
" 'chunk_size' : [128, 192, 256, 320],\n",
" 'chunk_overlap' : [32, 64, 96, 128, 160, 192],\n",
" 'chunk_size' : [128, 256, 384],\n",
" 'chunk_overlap' : [16, 64, 128],\n",
"}\n",
"searchable_shared_params = {\n",
" 'embed_model' : [(\"huggingface\",\"all-MiniLM-L6-v2\"),(\"huggingface\", \"BAAI/bge-base-en-v1.5\")]\n",
" 'embed_model' : [(\"huggingface\",\"all-MiniLM-L6-v2\")] # add more as tuples: ,(\"huggingface\", \"BAAI/bge-base-en-v1.5\")\n",
"}\n",
"searchable_eval_params = {\n",
" 'retrieval_top_k' : [2, 4, 8]\n",
Expand Down Expand Up @@ -419,7 +419,7 @@
" search_method = search_method,\n",
" target_metric = target_metric,\n",
" evaluation_set_path=evaluation_set_path,\n",
" debug=True,\n",
" debug=False,\n",
")\n",
"\n",
"results = mysearch.run(weaviate_client)"
Expand Down
10 changes: 4 additions & 6 deletions src/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,23 +187,21 @@ def run(self, weaviate_client: weaviate.Client):
)

# run indexing pipeline
logger.info(
f"Starting indexing pipeline of RUN {run_count}/{n_runs} with {indexing_config}")
self.runner.run(indexing_pipeline)

check_weaviate_class_exists(
weaviate_client,
indexing_config["weaviate_class"],
)

logger.info(
f"Starting indexing pipeline of RUN {run_count}/{n_runs} with {indexing_config}")

# run evaluation pipeline
logger.info(
f"Starting evaluation pipeline of run #{run_count} / {n_runs} with {evaluation_config}")
self.runner.run(input=evaluation_pipeline,
extra_volumes=self.extra_volumes,
)

logger.info(
f"Starting evaluation pipeline of run #{run_count} / {n_runs} with {evaluation_config}")

# read metrics from pipeline output
metrics = {}
Expand Down

0 comments on commit a374891

Please sign in to comment.