Skip to content

Commit

Permalink
Releases 3.3.0 with embed, recommend endpoints (#229)
Browse files Browse the repository at this point in the history
  • Loading branch information
wanliAlex authored Apr 24, 2024
1 parent 00a19ed commit b0cbce2
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 18 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"tox"
],
name="marqo",
version="3.2.1",
version="3.3.0",
author="marqo org",
author_email="org@marqo.io",
description="Tensor search for humans",
Expand Down
2 changes: 1 addition & 1 deletion src/marqo/version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__marqo_version__ = "2.4.0"
__marqo_version__ = "2.5.0"
__marqo_release_page__ = f"https://github.com/marqo-ai/marqo/releases/tag/{__marqo_version__}"

__minimum_supported_marqo_version__ = "2.0"
Expand Down
19 changes: 3 additions & 16 deletions tests/v2_tests/test_embed.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,9 @@ def test_embed_list_content(self):
self.assertIn("processingTimeMs", embed_res)
self.assertEqual(embed_res["content"], [{"Jimmy Butler is the GOAT.": 1}, "Alex Caruso is the GOAT."])
self.assertTrue(
np.allclose(embed_res["embeddings"][0], retrieved_docs["results"][0]["_tensor_facets"][0]["_embedding"]))
np.allclose(embed_res["embeddings"][0], retrieved_docs["results"][0]["_tensor_facets"][0]["_embedding"], atol=1e-6))
self.assertTrue(
np.allclose(embed_res["embeddings"][1], retrieved_docs["results"][1]["_tensor_facets"][0]["_embedding"]))
np.allclose(embed_res["embeddings"][1], retrieved_docs["results"][1]["_tensor_facets"][0]["_embedding"], atol=1e-6))


def test_embed_non_numeric_weight_fails(self):
Expand All @@ -146,17 +146,4 @@ def test_embed_non_numeric_weight_fails(self):
with self.assertRaises(MarqoWebError) as e:
self.client.index(test_index_name).embed(content={"text to embed": "not a number"})

self.assertIn("not a valid float", str(e.exception))


def test_embed_empty_content(self):
for cloud_test_index_to_use, open_source_test_index_name in self.test_cases:
test_index_name = self.get_test_index_name(
cloud_test_index_to_use=cloud_test_index_to_use,
open_source_test_index_name=open_source_test_index_name
)
with (self.subTest(test_index_name)):
with self.assertRaises(MarqoWebError) as e:
self.client.index(test_index_name).embed(content=[])

self.assertIn("bruh should not be empty", str(e.exception))
self.assertIn("not a valid float", str(e.exception))

0 comments on commit b0cbce2

Please sign in to comment.