Skip to content

Commit

Permalink
remove languagebind tests
Browse files Browse the repository at this point in the history
  • Loading branch information
vicilliar committed Sep 19, 2024
1 parent 2b1be93 commit 2fdb2e1
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 29 deletions.
47 changes: 25 additions & 22 deletions tests/cloud_test_logic/cloud_test_index.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@ class CloudTestIndex(str, Enum):
structured_image_custom = "pymarqo_str_img_custom"
structured_text = "pymarqo_str_txt"
structured_image = "pymarqo_str_img"
structured_languagebind_model = "pymarqo_str_langbind_model"

# TODO: add this back after sample cloud test run
# structured_languagebind_model = "pymarqo_str_langbind_model"


index_name_to_settings_mappings = {
Expand Down Expand Up @@ -114,25 +116,26 @@ class CloudTestIndex(str, Enum):
"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,
},
# TODO: add this back after sample cloud test run
#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,
#},
}
7 changes: 4 additions & 3 deletions tests/marqo_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,9 +215,10 @@ def setUpClass(cls) -> None:
cls.test_cases = [
(CloudTestIndex.unstructured_image, cls.unstructured_index_name),
]
cls.test_cases_multimodal = [
(CloudTestIndex.structured_languagebind_model, cls.structured_languagebind_index_name)
]
# TODO: Add this back after sample cloud test run
#cls.test_cases_multimodal = [
# (CloudTestIndex.structured_languagebind_model, cls.structured_languagebind_index_name)
#]

# class property to indicate if test is being run on multi
cls.IS_MULTI_INSTANCE = (True if os.environ.get("IS_MULTI_INSTANCE", False) in ["True", "TRUE", "true", True] else False)
Expand Down
8 changes: 4 additions & 4 deletions tests/v2_tests/test_add_documents.py
Original file line number Diff line number Diff line change
Expand Up @@ -589,9 +589,6 @@ def test_no_model_custom_vector_doc(self):
Note: `no_model` is not yet supported on Cloud.
"""
self.test_cases = [(CloudTestIndex.unstructured_no_model, self.unstructured_no_model_index_name)]
self.test_cases_multimodal = [
(CloudTestIndex.structured_languagebind_model, self.structured_languagebind_index_name)
]

for cloud_test_index_to_use, open_source_test_index_name in self.test_cases:
test_index_name = self.get_test_index_name(
Expand Down Expand Up @@ -708,6 +705,8 @@ def test_add_empty_docs_batched(self):
tensor_fields="field a")
assert res == []

# TODO: Add back
"""
def test_add_multimodal_single_documents(self):
documents = [
{
Expand Down Expand Up @@ -804,4 +803,5 @@ def test_add_multimodal_field_document(self):
self.assertIn('_tensor_facets', doc['results'][0])
self.assertIn('_embedding', doc['results'][0]['_tensor_facets'][0])
self.assertEqual(len(doc['results'][0]['_tensor_facets'][0]['_embedding']), 768)
self.assertEqual(len(doc['results'][0]['_tensor_facets'][0]['_embedding']), 768)
"""

0 comments on commit 2fdb2e1

Please sign in to comment.