From 9536358d340dac9440cacccd31f42c971bdb8a73 Mon Sep 17 00:00:00 2001 From: Saba Date: Sat, 11 Dec 2021 11:58:19 -0500 Subject: [PATCH] Fix key error model_name issue by upgrade sentence-transformers version Refer to https://github.com/UKPLab/sentence-transformers/issues/1241 Also user verbose flag passed through function parameters in image_search --- environment.yml | 2 +- src/search_type/image_search.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/environment.yml b/environment.yml index e56ebe26..e2e3245d 100644 --- a/environment.yml +++ b/environment.yml @@ -6,7 +6,7 @@ dependencies: - numpy=1.* - pytorch=1.* - transformers=4.* - - sentence-transformers=2.0.0 + - sentence-transformers=2.1.0 - fastapi=0.* - uvicorn=0.* - pyyaml=5.* diff --git a/src/search_type/image_search.py b/src/search_type/image_search.py index 34a38a9e..f0025328 100644 --- a/src/search_type/image_search.py +++ b/src/search_type/image_search.py @@ -160,7 +160,7 @@ def setup(config: ImageSearchConfig, regenerate: bool, verbose: bool) -> ImageSe # Extract Entries image_directory = resolve_absolute_path(config.input_directory, strict=True) - image_names = extract_entries(image_directory, config.verbose) + image_names = extract_entries(image_directory, verbose) # Compute or Load Embeddings embeddings_file = resolve_absolute_path(config.embeddings_file)