mirror of
https://github.com/khoaliber/khoj.git
synced 2026-03-02 21:19:12 +00:00
Re-enable tests for image search
Verify if recent fixes resolve test flakiness
This commit is contained in:
@@ -39,14 +39,14 @@ def model_dir(search_config):
|
||||
model_dir = search_config.asymmetric.model_directory
|
||||
|
||||
# Generate Image Embeddings from Test Images
|
||||
# content_config = ContentConfig()
|
||||
# content_config.image = ImageContentConfig(
|
||||
# input_directories = ['tests/data/images'],
|
||||
# embeddings_file = model_dir.joinpath('image_embeddings.pt'),
|
||||
# batch_size = 10,
|
||||
# use_xmp_metadata = False)
|
||||
content_config = ContentConfig()
|
||||
content_config.image = ImageContentConfig(
|
||||
input_directories = ['tests/data/images'],
|
||||
embeddings_file = model_dir.joinpath('image_embeddings.pt'),
|
||||
batch_size = 10,
|
||||
use_xmp_metadata = False)
|
||||
|
||||
# image_search.setup(content_config.image, search_config.image, regenerate=False, verbose=True)
|
||||
image_search.setup(content_config.image, search_config.image, regenerate=False, verbose=True)
|
||||
|
||||
# Generate Notes Embeddings from Test Notes
|
||||
content_config.org = TextContentConfig(
|
||||
@@ -69,10 +69,10 @@ def content_config(model_dir):
|
||||
compressed_jsonl = model_dir.joinpath('notes.jsonl.gz'),
|
||||
embeddings_file = model_dir.joinpath('note_embeddings.pt'))
|
||||
|
||||
# content_config.image = ImageContentConfig(
|
||||
# input_directories = ['tests/data/images'],
|
||||
# embeddings_file = model_dir.joinpath('image_embeddings.pt'),
|
||||
# batch_size = 10,
|
||||
# use_xmp_metadata = False)
|
||||
content_config.image = ImageContentConfig(
|
||||
input_directories = ['tests/data/images'],
|
||||
embeddings_file = model_dir.joinpath('image_embeddings.pt'),
|
||||
batch_size = 1,
|
||||
use_xmp_metadata = False)
|
||||
|
||||
return content_config
|
||||
Reference in New Issue
Block a user