Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Skip languagebind tests and add map features #258

Open
wants to merge 1 commit into
base: mainline
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 25 additions & 21 deletions tests/cloud_test_logic/cloud_test_index.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,31 +108,35 @@ class CloudTestIndex(str, Enum):
{"name": "int_field_1", "type": "int", "features": ["score_modifier"]},
{"name": "int_filter_field_1", "type": "int", "features": ["filter", "score_modifier"]},
{"name": "bool_field_1", "type": "bool", "features": ["filter"]},
{"name": "map_field_1", "type": "map<text, int>", "features": ["score_modifier"]},
{"name": "map_field_2", "type": "map<text, long>", "features": ["score_modifier"]},
{"name": "map_field_3", "type": "map<text, float>", "features": ["score_modifier"]},
{"name": "map_field_4", "type": "map<text, double>", "features": ["score_modifier"]},
],
"tensorFields": ["text_field_1", "text_field_2", "text_field_3", "image_field_1"],
"imagePreprocessing": {
"patchMethod": "simple",
}
},
CloudTestIndex.structured_languagebind_model: {
"type": "structured",
"model": "LanguageBind/Video_V1.5_FT_Audio_FT_Image",
"inferenceType": "marqo.GPU",
"storageClass": "marqo.balanced",
"allFields": [
{"name": "text_field_1", "type": "text"},
{"name": "text_field_2", "type": "text"},
{"name": "text_field_3", "type": "text"},
{"name": "video_field_1", "type": "video_pointer"},
{"name": "video_field_2", "type": "video_pointer"},
{"name": "video_field_3", "type": "video_pointer"},
{"name": "audio_field_1", "type": "audio_pointer"},
{"name": "audio_field_2", "type": "audio_pointer"},
{"name": "image_field_1", "type": "image_pointer"},
{"name": "image_field_2", "type": "image_pointer"},
{"name": "multimodal_field", "type": "multimodal_combination"},
],
"tensorFields": ["multimodal_field", "text_field_3", "video_field_3", "audio_field_2", "image_field_2"],
"normalizeEmbeddings": True,
},
# CloudTestIndex.structured_languagebind_model: {
# "type": "structured",
# "model": "LanguageBind/Video_V1.5_FT_Audio_FT_Image",
# "inferenceType": "marqo.GPU",
# "storageClass": "marqo.balanced",
# "allFields": [
# {"name": "text_field_1", "type": "text"},
# {"name": "text_field_2", "type": "text"},
# {"name": "text_field_3", "type": "text"},
# {"name": "video_field_1", "type": "video_pointer"},
# {"name": "video_field_2", "type": "video_pointer"},
# {"name": "video_field_3", "type": "video_pointer"},
# {"name": "audio_field_1", "type": "audio_pointer"},
# {"name": "audio_field_2", "type": "audio_pointer"},
# {"name": "image_field_1", "type": "image_pointer"},
# {"name": "image_field_2", "type": "image_pointer"},
# {"name": "multimodal_field", "type": "multimodal_combination"},
# ],
# "tensorFields": ["multimodal_field", "text_field_3", "video_field_3", "audio_field_2", "image_field_2"],
# "normalizeEmbeddings": True,
# },
}
3 changes: 3 additions & 0 deletions tests/v2_tests/test_add_documents.py
Original file line number Diff line number Diff line change
Expand Up @@ -574,6 +574,7 @@ def test_custom_vector_doc(self):
assert doc_res['_tensor_facets'][0]["my_custom_vector"] == "custom vector text"
assert doc_res['_tensor_facets'][0]['_embedding'] == [1.0 for _ in range(DEFAULT_DIMENSIONS)]

@mark.skip
def test_no_model_custom_vector_doc(self):
"""
Tests the `no_model` index model and searching with no `q` parameter.
Expand Down Expand Up @@ -708,6 +709,7 @@ def test_add_empty_docs_batched(self):
tensor_fields="field a")
assert res == []

@mark.skip
def test_add_multimodal_single_documents(self):
documents = [
{
Expand Down Expand Up @@ -754,6 +756,7 @@ def test_add_multimodal_single_documents(self):
self.assertIn('_embedding', tensor_facets[0])
self.assertEqual(len(tensor_facets[0]['_embedding']), 768)

@mark.skip
def test_add_multimodal_field_document(self):
multimodal_document = [{
"_id": "1_multimodal",
Expand Down
Loading